Search Unity

Creating a shockwave

Discussion in 'Scripting' started by ICS499, Mar 4, 2010.

  1. ICS499

    ICS499

    Joined:
    Feb 20, 2010
    Posts:
    11
    I was wondering if it's possible to create a shockwave without physically creating a model for it. I have fire balls flying from the sky in my game and when they hit the ground I'd like to spawn a shockwave where they hit.

    Is it possible to create a shockwave-like effect using particles and/or scripting?

    Ideally I'd like to be able to create the pulsing effect using just particles but I lack the knowledge to do so. Maybe someone can elighten me.

    Any helps appreciated. Thanks in advance.
    -Anthony
     
  2. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    You could use a particle system for this, if you are looking for the effect I think you are. Try using an ellipsoid emitter with the Y value of the ellipsoid set to zero. If you enable the One Shot setting, the particles will be sent out as a pulse rather than a continuous stream. This will give you a ring of particles around the target point. To make them move away from the centre, set the tangent velocity's Z value to whatever speed is appropriate for the game. If you also set the damping value of the particle animator below one, you will see the ring of particles slow down as if the force of the explosion was wearing off. Finally, try adding a bit of Size Grow in the animator.
     
  3. ICS499

    ICS499

    Joined:
    Feb 20, 2010
    Posts:
    11
    I think I love you. :D :D