Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How to make a rocket booster fall after some time?

Discussion in 'Scripting' started by Imnota3yearold, Mar 9, 2015.

  1. Imnota3yearold

    Imnota3yearold

    Joined:
    Feb 23, 2015
    Posts:
    9
    I have a space orbiter and I want the two side boosters fall after some time. How would I do that?
     
  2. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,356
    co-routine or have a Time.deltaTime routine. Eg lets say u want them to fall away in 20 secs.
    float drop=0;

    void Update(){

    drop=drop*Time.deltaTime.
    If (drop>=20 ){drop boosters etc};
    }
     
  3. Imnota3yearold

    Imnota3yearold

    Joined:
    Feb 23, 2015
    Posts:
    9
    Thanks
     
  4. Imnota3yearold

    Imnota3yearold

    Joined:
    Feb 23, 2015
    Posts:
    9
    Is that for javascript or C#
     
  5. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,356