How to create physic logic for a platformer game?


Hello :slight_smile: SO I am trying to create a 2D platformer game and I cannot seem to figure out why my main character is unable to remain standing straight on the platform :confused: I was able to create a tilemap and set it to a static collision object and I made my main character (IDLE) along with its other animations(i.e. walk Left, walk Right, jump, etc.) a dynamic collision object. My MAIN goal is to have my character perform its animations while remaining on top of the tilemap on the collections screen. Any help AND/OR feedback WHATSOEVER would be GREATLY appreciated!

P.S. - If someone knows how to create multiple instances of coins along with the proper behavior so that my character would be able to collect them, PLEASE DO let me know :slight_smile: THANK YOU!

AnAnimal’ (604.2 KB)



The side-scroller tutorial shows how this can be done:

If you have problems with physics my first recommendation is to enable physics debugging in game.project:

With this enabled you quickly see that your player character has a pretty big collision box and that the ground consists of a single small collision tile:

Since you are using a tilemap I suggest that you check this example on how to do tilemap collilsions:

And read this manual: