- Home /
How do I prevent characters from being able to land on each others heads?
I am working on a 2D fighter and the movement seems fine, but I dont want the characters to be able to land on each others heads. I used circle colliders hoping that they would slide off, but they can still stay on top of the head. Is there something I should try in script? or Is there a way to do this with just the colliders?
Answer by brazmogu · Nov 06, 2015 at 12:54 PM
Assigning a Physics Material without friction should make it so they don't "attach" to each other due to gravity and contact.
Maybe another way to do this would be to apply a small repelling force from each object to another when they collide, so they'll not get "stuck".
Thank you for your answer! I actually ended up doing both of these things to get the desired effect. It still looks a little jerky, but I think I just need to adjust my repelling force a little.
right now I am using a box collider as a trigger and adding a small force when they come in contact with each other.
Your answer
Follow this Question
Related Questions
Questions about movement on uneven/slopped terrain and terrain coliders 0 Answers
what collider to use for 2d movement? 1 Answer
Polygon Collider 2D doesn't have the "edit collider" button avaliable. 0 Answers
Multiple Stacked Colliders only register for single object 0 Answers
Disable horizontal movement (2D) 0 Answers