I have been trying to detect collisions between a player (kinematic) and a cube (rigidbody). they collide perfectly fine in-game as in the player can move the cube, but I want to detect when the player comes in contact with the cube.
I have tried using the code below but that didn't seem to work as it wasn't printing out a collision. I tried placing a staticbody to see if it collides with the kinematicbody and it works as intended.
var collision = move_and_collide(velocity * delta)
if collision:
print("collision")
queue_free()