Can someone fix this? I have the component in terrain and im new to the scripting aspect of Unity:
function OnTriggerEnter (other : Collider) {
other.transform.position = Vector3(1121.029, 55.90824, 937.687);
}
Can someone fix this? I have the component in terrain and im new to the scripting aspect of Unity:
function OnTriggerEnter (other : Collider) {
other.transform.position = Vector3(1121.029, 55.90824, 937.687);
}
I believe you have to have a rigidbody for OnTriggerEnter().
Note that trigger events are only sent if one of the colliders also has a rigidbody.
Make sure you have Rigidbody or Controller Collider assigned to your player.