How to jump on Tileset?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Ondafloor96

I’m trying to make a 2d platform game. My player is Rigidbody2D.
I have a function in 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
		return false

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?

:bust_in_silhouette: Reply From: Freya

If I’m not mistaken, the problem is that the colliding body is the tile itself, so you should add the group “GROUND” to the tiles and not the tileset or the tilemap. Hope this helps!