|Topic was automatically imported from the old Question2Answer platform.
I am new to Godot so I don’t know a lot of stuff. I tried by making a fake cursor using a 2D kinematic body that follows the mouse cursor around. The problem is that it doesn’t collide with a 2D static body that has a 2D collisionshape. For some reason, the cursor can pass through the collision shapes. I tried changing the staticbody into a rigidbody and the cursor collided with it properly. The problem with this is that I can push the rigid body around. Is there a solution to this problem?
Can you provide your code and/or an example project? How do you change the fake cursors position? Have you changed the collision-layer or- mask of any of the nodes involved? A KinematicBody2D can collide with a StaticBody2D, so the problem is likely related to something else you did. But it’s impossible to tell what exactly that might be, given the amount of information you’ve provided so far.
njamster | 2020-04-21 16:38
This is attached to the kinematicbody2D:
mouseposition = get_global_mouse_position()
position = mouseposition
The fake cursor follows the mouse’s position.
NathanielFumar | 2020-04-22 04:21