[SOLVED] How do i fix 2D character bumping on tile collider2D edges??
So, i'm coding all the movement mechanics of a 2D platformer, i'm using rigidbody and velocity(i made almost everything using velocity). Everything is running smoothly, altough my character keeps bumping while walking, i guess thats the edges of my individual tiles colliding with my character capsule collider and ramping him up.
I increased the sprint speed a lot so its easy to notice whats happening, note that im not jumping at any moment, i am just moving right and left and this bumping happens.
I read somewhere that to fix it i gotta use EdgeColliders, but that means i have to hand draw my entire tilemap collider.
i need help fixing this, im stuck cause of this little thing, that breaks my entire movement.
Answer by PriniBR · Oct 27, 2020 at 04:46 PM
After a day trying a lot of stuff, i found something quick and easy, that worked.
-attach a CompositeCollider2D to your tilemap.
-check Used By Composite on your TilemapCollider2D.
-as the CompositeCollider creates a Rigidbody by default, just make sure to make it static or work your constraints, otherwise your tilemap can fall or rotate in runtime.
Thanks, this helpt me with the majority of bumping.
Your answer
Follow this Question
Related Questions
How do you deactivate a collider/gameobject for one player in a 2-player game with a button? 0 Answers
Tilemap Collision 2D colliding with ground. 0 Answers
Should I use Rigidbodies in a top down 2D game if I don't need physics? 0 Answers
Calculate BoxCollider2D based on the actual player sprite 2 Answers