Murasaki
Murasaki

Reputation: 1

How can I make my card detect whether it collided with a kinematicbody2D in the Godot game engine?

I am a beginner in Godot game engine. I'm trying to make a platformer game that uses cards as a skill system. I want to enable the skill whenever the card is put or hovered around the player's sprite. However, I am getting stuck in this problem that I can't make my card detect the player when I hover the card around the player. I've tried to use the body_entered signal, but nothing happens, I tried to print something in the signal function to test whether the signal is working but the it prints nothing so it means the signal is not working.

Upvotes: 0

Views: 158

Answers (1)

blepis
blepis

Reputation: 13

try setting the position of the card to the position of the mouse, then under CollisionObject2D theres a signal called "mouse_entered()", which you can use to check if the mouse entered the player's collision

Upvotes: 0

Related Questions