void OnTriggerEnter(Collider other){
if (other.transform.tag == “Teleport 1”) {
transform.position = teleport2.transform.position;
}
if (other.transform.tag == “Teleport 2”) {
transform.position = teleport1.transform.position;
}
}
So, now the problem is that the object (player) gets teleported from 1 position to the other very fast, infinitely (each frame).
Is there any way to stop the teleportation from happening until player leaves the trigger?
By the way, teleport1 and 2 are GameObject variables defined above the OnTriggerEnter function.
Thanks!