- Home /
GameObject keeps bouncing after hitting a bouncy material
I got a Edge collider as the ground and some square shaped sprites with RigidBody2D
and BoxCollider2D
components. I've added a physics2D material to the ground with below properties to make the sprites bounce a little after hitting the ground.
Friction: 1
Bounciness: 0.2
When I run the game, sprites fall off and hit the ground with a little bouncing. But the never fully stop after hitting the ground and keep bouncing very slightly like their vibrating.
How can I make the sprites fully stop after 2 or 3 times hitting the ground by bouncing?
Answer by Bunny83 · Jul 26, 2016 at 02:23 PM
Such effects are usually minimized if your object has some drag. Drag will permanently slow down your object and should prevent endless bouncing.
Sound pretty obvious right know but I was close to drive myself crazy for that little thing! Thanks!
Answer by ScaniX · Jul 26, 2016 at 02:42 PM
You could also check the bouncing threshold (don't know what it is called exactly) in the global physics settings. There is a minimum bouncing below which objects stop bouncing at all.
The "Bounce Threshold" is a Physics3d setting so has no influence here (Physics2d). In the 2d settings there's a similar setting called "Velocity Threshold" which is usually set to "1". So every collision that happens at a speed less than that threshold is treated as inelastic and won't bounce
Answer by MelvMay · Jul 26, 2016 at 11:36 AM
Sounds like you might have the global gravity turned-up high and/or the Rigidbody2D gravity-scale turned-up. You might also want to turn the friction down a little to see if that helps.