- Home /
Question by
Foxtail Boyd · Jul 15, 2014 at 12:11 AM ·
respawn
Wrapping environmental objects/platforms
Hello again, I am currently having trouble with these clouds I want to move across the title screen. First off, I have this code in place. Sure the cloud moves but it just falls through the transparent boundary I've set and keeps going: #pragma strict
var WhiteCloud : GameObject;
var spawnPoint : Transform;
function OnTriggerEnter(other : Collider){
Destroy(other.gameObject);
var WhiteCloud : GameObject = Instantiate(WhiteCloud,spawnPoint.position, Quaternion.identity);
WhiteCloud.transform.position = spawnPoint.position;
}
This may seem a bit insipid but I just edited a Player respawn code and replaced the player with the WhiteCloud that I am using. I even put the White Cloud and the transparent boundaries that are supposed to destroy it as prefabs. I'm really confused on what I'm supposed to do!
Comment
Your answer
Follow this Question
Related Questions
Camera entering infinite loop at respawn 1 Answer
Respawn on Collision Problems. 2 Answers
Respawn codes for background objects? 0 Answers
Random Spawning Question 2 Answers
Trying to make a checkpoint script 3 Answers