Search Unity

Physics Bounce More Than 1

Discussion in 'Scripting' started by tigerfoot, Mar 6, 2013.

  1. tigerfoot

    tigerfoot

    Joined:
    Nov 2, 2009
    Posts:
    132
    I want my objects (cars) to bounce off each other more than what's current max value in "Bouncy" physics material. I managed to, somewhat, achieve this by multiplying rigidbody.velocity but I'm getting some weird behaviours and speed boosts since those cars are hitting each other very often.

    How could I achieve that, bounce more than 1, effect without directly changing rigidbody.velocity value?
     
  2. Tsumik1

    Tsumik1

    Joined:
    Oct 15, 2012
    Posts:
    49
    Rigidbody.AddForce use this with OnCollisionEnter() so that when the car hits another car(maybe add in a tag check so it only does it when it hits another car.) it adds force in the opposite direction to emulate a "bounce".