- Home /
Rigidbody bumping on smooth surface
I'm trying to slide a friction-less cube (with a constant force and set velocity limit) along a flat path made from multiple friction-less cubes perfectly aligned. I have the cube that is sliding set to interpolate, but it doesn't stop it from jerking when it slides over from one cube to the next.
So my question is, how do I make my cube slide across multiple other cubes smoothly without jerking as it begins sliding onto the next cube.
-Thank you
If you could post some pictures it would help me to understand what is happening and how it is set-up.
Can confirm this, seems to be a rigidbody behaviour. Not happening with a character controller.
lancer: If you allign two surfaces next to each other, with no gap and no overlap (perfectly alligned), any sliding rididbody starts jumping/jerking as soon as it crosses the seam.
Sliding can be achieved by enabling gravity and setting the physics material bounciness to 0.
I assume this has something to do with the surface normals, somebody should test it with calculated normals ins$$anonymous$$d of imported ones.
Here is a picture showing the set up. A bottom row of stationary cubes with one cube on top sliding along:
Answer by elforama · Aug 09, 2013 at 02:25 AM
I found a solution, I'll see how well it works over time.
On the moving cube I added a raycast. It projects downwards along the y axis. When it detects the cubes below it are less than a certain distance (very small) it sets the rigidbody's y velocity to zero. This seems to stop the jerking motion when it crosses over the seams.
Answer by Benproductions1 · Aug 08, 2013 at 05:21 AM
http://lmgtfy.com?q=Unity+Rigidbody+seams
Thanks, "seams" helps searching a lot. I'll try out some of those links tomorrow and see if they help.
Your answer
Follow this Question
Related Questions
iOS game: Physics with ConstantForce 1 Answer
How to disable constant force over time? Rocket game 2 Answers
Rigidbody slowly moves 1 Answer
Making a surface have accurate friction 0 Answers