- Home /
Question by
CryFan001 · Dec 21, 2018 at 10:10 PM ·
triggerteleportteleportingcapsulecollider
Teleporting player doesn't work?
I'm trying to make a teleporter that teleports the target 5 units more on each axis. I wrote this script:
void OnTriggerEnter(Collider collider)
{
collider.transform.position = collider.transform.position + new Vector3(10, 10, 10);
}
But this doesn't work. I just see flashes of the new position loading but it never did. NOTE: I did mark my teleporter object (which has a capsule collider) to a trigger
Comment
Answer by JonPQ · Dec 21, 2018 at 10:40 PM
are you trying to move the collider instead of the collidee ?