Having my GameObject passing trough floor during one frame ( 2D Platformer )
Hello,
Here is my problem (which is not that bad but still annoying) :
I have a Character with a Rigidbody2D and a BoxCollider2D attached to it standing on a platform which also has a a BoxCollider2D. Everything is fine until I jump and land the jump. During one frame, my character is ligthly( depending on falling speed ) below the ground, then goes back up. As if the collider "didn't work" during one frame.
I guess that's because, during this frame, the transform.position my character should have is calculated before the collision are checked ?! How can I avoid that ? Or is it something else ? Have I done something wrong, missing something ?
It's kind of a dumb question but I couldn't find anything solving my problems through help and already asked question.
Thanks you in advance !
Answer by Tashmore · Jan 14, 2016 at 09:21 AM
Found a topic talking about it, the first solution worked for me ( Setting the rigidbody Collision Detection to "continous" ) and it looks ok.
I post the topic just in case it could help others : http://johnstejskal.com/wp/how-to-stop-falling-through-floors-in-unity/
Your answer
Follow this Question
Related Questions
Player controlled platforms 0 Answers
How can I slow the movement of a single rigidbody2D? 2 Answers
[2D] Rigid body snaps through floor and back 1 Answer
2d platformer physics 0 Answers