Remove Rigidbody2D "Jelly" Collisions?
Edit: It's been about 18 hours since I posted right now and there's absolutely no answers and no comments. If you need information, don't just close the tab... comment and ask!
Chances are, if I didn't provide the information, I have no clue whether or not it's needed. So please, just comment and ask for more information. I'll gladly edit my post to include anything you need.
Hey there!
I'm using Rigidbody2D and it seems every time I try to change how I calculate gravity, Unity adds in this "Jelly Fall" effect. In short, when my object collides with the ground, it will fall past the object by a bit and slowly "correct itself" to the floor's actual height.
I've looked this up online by seeing how people solve the "jittering" that Rigidbody can have, but noen of the solutions worked. Here's what I tried:
Setting to the Rigidbody's velocity directly
Using Rigidbody2D.AddForce()
Using Rigidbody2D.MovePosition()
Enabling/Disabling isKinesmatic
Switching the gravity code between Update() and FixedUpdate()
Any ideas on how to fix this?
Answer by Shizuku_Mizuki · Nov 25, 2017 at 08:46 PM
I ended up finding out the answer to my own question. Apparently I had to change Collision Detection from "Discrete" to "Continuous".
Would've been nice if someone asked for clarification if they needed it.