Hi,
I want an object to follow my mouse, when this object touches another one I want them both to change color.
So since there will be collision calculation I tought they would be rigid bodies, but gravity got in the way. So Static body then ? but when I try to position stuff collision shapes wont move. I’ve seen you need to apply force but doesn’t that seem completely overkill for this feature I’m trying to do ?
Or maybe I just don"t know what node to select to have built in collision calculation … or maybe I have to do the calculations by hand in gdscript ?
i would just create a sprite2d that has an area2d as its child.
I don’t know what you thought your object could be, I assume it’s an image.
Either way, in its _process() method, it can set its position to be where the mouse is. position = get_viewport().get_mouse_position() or something.
Either way, the sprite2d has an area2d as its child, therefore the area2d can detect collision with other areas. if that happens, it can process the collision.