- Home /
Question by
xXTURDLEXx · Dec 14, 2012 at 12:22 PM ·
gameobjectrespawn
die then respawn after couple of secs when touching a ridgid body?
the tittle!
Comment
Answer by Jake.OConnor · Dec 14, 2012 at 02:00 PM
A) You should post more more specifics in your questions.
B) Use a simple coroutine to wait for X number of seconds and then respawn. The following code should get you started.
public IEnumerator Respawn( float x, GameObject go)
{
Destroy(go);
yield return new WaitForSeconds( x );
Instantiate(go, ---, ---); // Where --- are the position and rotation you want.
}