IMHOTEP Framework
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
ExplosionWobble.cs
1 //======= Copyright (c) Valve Corporation, All rights reserved. ===============
2 //
3 // Purpose: Makes the weeble wobble
4 //
5 //=============================================================================
6 
7 using UnityEngine;
8 using System.Collections;
9 
10 namespace Valve.VR.InteractionSystem
11 {
12  //-------------------------------------------------------------------------
13  public class ExplosionWobble : MonoBehaviour
14  {
15  //-------------------------------------------------
16  public void ExplosionEvent( Vector3 explosionPos )
17  {
18  var rb = GetComponent<Rigidbody>();
19  if ( rb )
20  {
21  rb.AddExplosionForce( 2000, explosionPos, 10.0f );
22  }
23  }
24  }
25 }