- Home /
Bouncy rigid body, although bounciness is 0?
Hi folks,
I'm wondering why a stack of rigid bodies is bouncing although bounciness of the material is set to 0.0. Here's a video of the behavior: http://www.youtube.com/watch?v=NQsSdbBr8jU
The objects are generated by a script. They are all instances of the same prefab object, so they have all the same settings. They are placed according to their size exactly adjacent to each other. Somehow it looks like they squeeze under their own pressure. However, lowering the mass of the blocks doesn't change anthing. They still bounce.
What's causing this behavior and how do I get rid of it or reduce it to a level where the blocks behave like wooden blocks of only a few centimeters in size?
Thanks!
http://answers.unity3d.com/questions/523983/physics-behaves-more-strangely-with-time.html
It seems to all come down to penalty force.
You may need to force the rigidbodies to sleep.
Possibly answered here http://answers.unity.com/answers/1742689/view.html
Answer by Owen-Reynolds · Nov 13, 2013 at 10:37 PM
The video didn't play for me, but, in a vertical stack, I don't think that's bouncing. It's just the physics system having trouble. The only solution I've found is to set underneath blocks as kinematic. Then have OnCollisionEnter check speed/direction of a hit to see if the block should turn back on. Can be kind of a mess, depending what you expect to happen.
The problem seems to be that 5 blocks stacked is a ton of math. Imagine the blocks are a little off-center. They will lean, spin and fall over, which will look very nice. Unity doesn't know that your particular blocks are perfectly stacked. So, block A pushes down on B, which pushes that plus it's own weight on C ... until finally block F, on the floor, resists and pushes back up. That gives the odd waves. I've had thin blocks just pop into the middle of the block above them.
An idea I haven't tried is to artificially reduce the mass of higher blocks. Then a mass 1 block pushing down on a mass 5, onto a mass 25 ... won't flex as much. Might also try putting blocks to sleep when another block lands on them, but I'd guess any good smack will just wake them all up.
Huh? Video didn't play? Neither for me... I've tried several times and now it plays. Don't know why.
Anyway, yeah, I guess you're right. It's probably the physics engine hitting the brick wall. I had hoped to build a Jenga like game in Unity for practicing and experimenting purposes...
Your answer
Follow this Question
Related Questions
Unity 2D - Why does velocity causes the ball to change direction everytime it hits something? 1 Answer
Predicting projectile path after bouncing off Physics Material 2D 1 Answer
Character bounces even with bounciness=0 0 Answers
How to change bouncing direction 2 Answers
2D Polygon Collider Ball with bounce material not stay completely still 0 Answers