- Home /
Rigidbody2D character getting stuck when jumping on platform at climax point
The problem:
The problem I am having is that when my character jumps onto a platform and lands their when he is just at his climax point, he can get stuck inside of the collider I use. I have tried several things to solve this but all in vain.
This video shows the problem I am having: https://youtu.be/0jmOzAzL9LA
Current setup:
The setup I use at the moment for my ground:
tilemap collider
Composite collider 2D (set to outlines + zero friction and bounciness material)
The setup use for my player:
Rigidbody 2D (set to dynamic, continuous detection, new sleep mode, interpolate, freeze Z-axis rotation)
Gravity (1 x physics2D gravity when on ground, 1.25 x physics2D gravity when falling, 0.1 x Physics2D gravity when wall sliding, 1 x physics2D gravity when jumping up (physics2D gravity = -30 in the y axis))
What I tried:
I've tried several things to solve this issue.
adding a circle collider to the player
adding the zero friction and bounciness material
adding the composite collider for the tilemapcollider
setting this composite collider to outline (creates no ghost vertices that way)
adding a raycast downwards at the players feet to move the player up when landing
setting the gravityscale when the player is on the ground to 0
So yeah I have tried a lot of different things but can't seem to solve it. Hopefully someone can that would be great.