Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Newby | |
Old Version | Published before Godot 3 was released. |
I have two raycast to detect if my player has touched the ground but it detects all collision even on my enemies how can i make it so that it only will detect if i am touching the ground collison box.
here is my code for the raycast2d collision
func is_on_ground():
if raycast_down.is_colliding() or raycast_down2.is_colliding():
return true
You can do this by changing your enemies collision layer. However their naming has changed in 3.0, which version of Godot are you using?
Zylann | 2017-12-26 10:38
i am using v2.1
Newby | 2017-12-27 23:24