- Home /
Question by
Foxtail Boyd · Jul 17, 2014 at 07:31 PM ·
gravityrespawn
Respawn codes for background objects?
Hey there again, I'm still having problems with moving my clouds. The method that I'm wanting to do is to just use a player respawn code in order to make the clouds respawn once they hit the level limits. But it doesn't seem to be working at all! Can someone please help me with this? #pragma strict
var Player : GameObject;
var spawnPoint : Transform;
function OnTriggerEnter(other : Collider){
Destroy(other.gameObject);
}
Note: I've set the cloud as a prefab and put it in the "Player" box when I put the component in the inspector. And I've also put the SpawnPoint in the box under it that says "spawnPoint". And as an added question: how do I apply gravity to my clouds?
Comment