Should I use Area2D for platformer character collision detection over kinematic bodies?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Cav33
:warning: Old Version Published before Godot 3 was released.

For my game, I wanted a collision system that can allow characters/enemies to walk up or down slopes and do wall jumps.

I looked at the Godot platformer demo and while it does work…it does not have that “sharp” platformer feeling at all; the jumping and walking felt “floaty” and weird (in a bad way).

So I had a look at Kinematic Bodies for characters and I managed to create a playable character with one.

It had the “sharp” feeling with everything except wall jumps. My character just sticks to the wall or is able to jump up the against the same wall he/she jumps off of (which is a mechanic I don’t want).

Now I am considering using the Area2D nodes to detect the collisions then and use GDScript to handle collision responses.

One for the feet - to detect the ground.
And a few for the character’s sides for slope and wall detection, so wall jumping conditions can be detected.

Is there anything, I should consider when using multiple Area2Ds for character collision detection and collision response.

  • Like the performance because in the documentation, it said that contact reporting was memory intensive. (What happens if lots of objects go into one character?).
  • …or sweep tests
:bust_in_silhouette: Reply From: eons

Have you looked at kinematic character demo? it has a simple controller that works fine.
If using the development version, the new platformer demo has a kinematic controller too.


For the question, the walls can be worked with collision normal checks after move, colliding and checking if colliding with a wall (all Kinematic methods to use after move).

If you want extra proximity checks (or limit contact points), Raycast2D could be better than area too, is simple to work with them.

ps: Also, think on working with a state machine because adding more features can give some headaches with normal approach later.