SFE_Detach.js 255 B

123456789101112131415
  1. //this script detachs the object to the world immediately. Useful in bullets for example,
  2. //so they don't remain the child of the spaceship and do not move with it.
  3. #pragma strict
  4. function Start () {
  5. transform.parent=null;
  6. }
  7. function Update () {
  8. }