Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Ondafloor96 |
Hello,
I’m trying to make a 2d platform game. My player is Rigidbody2D.
I have a function in player.gd to check if the ground is in group “GROUND”, so that player can able to jump:
#ground check
func ground_check():
if ground_detector.is_colliding():
var body = ground_detector.get_collider()
if body.is_in_group("GROUND"):
return true
else:
return false
pass
I have added group “GROUND” to a StaticBody2D, and it works. But when I try to add group “GROUND” to a Tileset (even the Tilemap), the player still can’t jump.
Can anyone help me?