Hello! First of all, I’m new to processing and haven’t done much coding of any sort in a while. I feel like this should be really easy, but I’m having trouble for some reason. I’m trying to create a small game. I have variables called RelativeCenterX and RelativeCenterY, and when I change those everything in the canvas moves except the player’s object. One of the things that moves is a grid with 25x25 squares, and I want to make it so that when the mouse hovers over a specific spot on that grid, it is outlined in white.
The code I have for outlining it is simple,
`stroke(255);
strokeWeight(2);
fill(0,0,0,0);
rect(round((mouseX-12.5)/25)*25, round((mouseY-12.5)/25)*25, 25, 25)`
but I can’t figure out how to make that outline move with the grid. I want to make it so if I increase RelativeCenterX by 15, the outline moves to the right 15 pixels and the area where I put my mouse to activate it moves right by 15 pixels.
Any Tips? I feel like this should be really easy but I’m still having trouble.