Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | tam0705 | |
Old Version | Published before Godot 3 was released. |
I’m making a 2D game and using tilemap to make the environment easier to modify.
I have a rigidbody with a ball shape as a character. I want to make it jump everytime it collides with the surface of the tiles, so I tried to print what it collides with everytime it touches the surface.
The result was [TileMap:IDNumber]
Not only when it touches the surface, but the output also printed [TileMap:IDNumber] when the ball touches a wall with the same IDNumber!
So I made an area and put every collision shape on every surface to detect whether the player can jump or not, and it’s tiring and wasting time because my game environment is not thoroughly flat.
Can people tell me whether there are easier ways or not, because if I want to make other games where the player can jump I have to do this way.
Sorry for bad English. (Before I post this question I’ve tried to print what the player collided with but then it didn’t print anything -_-)