Search Unity

How can we create a explosion force?

Discussion in 'Physics' started by Stonetronics, Jun 3, 2015.

  1. Stonetronics

    Stonetronics

    Joined:
    Feb 7, 2015
    Posts:
    18
    with ForceMode.impulse or
    rigidbody.AddExplosionForce?
    It should push objects away just for a moment just like normal explosions, not a constant force "shield"
     
  2. HiddenMonk

    HiddenMonk

    Joined:
    Dec 19, 2014
    Posts:
    987
    You might be calling your addexplosionforce every frame. Try only calling it once, such as when an event happens.

    For example, only call it when you click your mouse.
     
  3. Stonetronics

    Stonetronics

    Joined:
    Feb 7, 2015
    Posts:
    18
    thank you, i'll try
     
  4. HiddenMonk

    HiddenMonk

    Joined:
    Dec 19, 2014
    Posts:
    987