Compatible collision constraint methods
In my Sonic inspired 2D platformer, Im constraining to vertical collisions by popping the player out of the floor in the step after they have moved, because it was most conducive to my slope handling methods. My question is, how do I deal with horizontal collisions as well? If I do the same thing that I have for vertical collisions, the order of checking will mean player gets popped out incorrectly. For example, if horizontal comes first, the player will move into the floor and move horizontally, before being moved out vertically, and vice versa for walls. If I use a prevent-it-from-ever-going-into-the-wall method it has to take place before the transform.Translate (velocity) which will mess up with everything else I've done. So, what do I do?
Your answer
Follow this Question
Related Questions
Player passenger moving when being pushed by two platforms 0 Answers
2D RigidBody slightly penetrates objects causing a bounce effect. 3 Answers
2D colliders doesnt work with Gravity Scale = 0 0 Answers
2D collision not working 0 Answers
How would I implement collisions with my tile-based movement? 0 Answers