So I have a cube that I stretched out under my racetrack to catch my character when it falls off the track. For my character, I’m using a character controller. For the cube, I’m using a box collider. I also have a respawn point located on the track that’s a cylinder that also uses a box collider. I have attached the following code to my cube to catch my character (and I dragged the cylinder in as the Spawn):
var spawn : Transform; //drag spawn point to here in the inspector
function OnTriggerEnter(other : Collider)
{
if (other.tag == “Player”)
{
other.transform.position = spawn.position;
}
}
Now here’s the problem. When my character respawns, it is taken to the general area of the cylinder, but it immediately falls through it and falls through the track. I don’t understand why this would be because both hold him just fine when the game starts out. The track has a mesh collider. Also, just to try some things, I attempted moving the cylinder up above the track–didn’t help. Any ideas? Thanks.