How to get a "perfect" bounce

Please don't post Bullet support questions here, use the above forums instead.
Post Reply
tommynator128
Posts: 2
Joined: Fri Jan 07, 2011 6:51 pm

How to get a "perfect" bounce

Post by tommynator128 »

Hello,

how can i get a bullet (rigidbody) to bounce like this from a wall(rigidbody):
Image
what parameters do i have to tune?

thanks,
tommy
Johan Gidlund
Posts: 26
Joined: Mon Jun 01, 2009 2:21 pm
Location: Sweden
Contact:

Re: How to get a "perfect" bounce

Post by Johan Gidlund »

You should tweak restitution. A value of one should give a fully elastic bounce.
tommynator128
Posts: 2
Joined: Fri Jan 07, 2011 6:51 pm

Re: How to get a "perfect" bounce

Post by tommynator128 »

i tried to set m_restitution to 1. but the ball still bounces in random directions
Johan Gidlund
Posts: 26
Joined: Mon Jun 01, 2009 2:21 pm
Location: Sweden
Contact:

Re: How to get a "perfect" bounce

Post by Johan Gidlund »

Oh you are talking about the actual directions.
Restitution has nothing to do with that obviously.

What will control the direction is the normal or the collision.
Is your ball a sphere shape?
If it is a hull or triangulated ball it will not have smooth normals and is thus bound to bounce in a more erratic way. You should not get random directions though. If so then debug what normals you are actually getting.
Post Reply