Rigidbody going through Colliders help!
So my rigidbody is continuously going through my colliders. I know that this has been posted a lot before, but I haven't found a solution and I can't believe Unity doesn't have a better collision detection system this late in development.
My rigidbody Collision detection is continous.
My rigibody has isKinematic set to false.
I am using Rigidbody.MovePosition on a FixedUpdate.
I cannot use Rigidbody.AddForce due to awkward/jittery movement.
All colliders have isTrigger set to false.
Both the object with the Rigidbody and the Collision object have Box Colliders.
Any suggestions?
Answer by BlueOctave · Apr 28, 2017 at 05:57 PM
I solved the issue by using Rigidbody.velocity = normalizedDirection speed time;
I know this is just over three years old now, but I was searching for AGES for a solution with the exact settings you list, and your solution is the only one that worked! Thank you! In my game, once I fixed my code to this my character stopped sprinting through walls and colliders, thus falling out of the map:
Rigidbody.velocity = normalizedDirection * Speed * SprintSpeed * Time.DeltaTime
Your answer
Follow this Question
Related Questions
Colliders "offset" and going down too. 0 Answers
Player moving though walls while pressing two keys 0 Answers
Sphere movement with attached cube 0 Answers
How to Make A Character Stop At Wall? 0 Answers
Simplest Box Collider Question. 2 Answers