so if i have a first-person controller and when it goes over point A it wil end up in a different spot point B?
Your question is
If I move over an abstract location will that cause an affect.
Seeing as we do not know the definition of your location and your title would have me interpret you want a teleport event you need.
1: ACTION: Measurement/Sensor. I am on A 2: REACTION: Moving to B by means of teleportation in a single frame.
Magistrix has shown you how, I wanted to show you my abstract answer. Just in case you wanted to build from there.
Hope it works out!
And please consider your question quality!!! The answers quality is usually not far from the question quality. So read the forum sticky's from the forum , read our FAQ, ask people, and use common sense, make sure everyone knows what you HAVE and what you WANT , and describe in detail the process starting from NOT HAVE --> TRYING TO HAVE --> ROADBLOCK.
Use a trigger that places the character at some other point on trigger.
Try something like this and attach it to your FPScontroller:
using UnityEngine;
using System.Collections;
using System.IO;
public class Teleport : MonoBehaviour
{
public Transform Teleporter_1;
public Transform Teleporter_2;
//Set your offset here
Vector3 Offset = new Vector3(5, 0, 5);
Vector3 Temp = new Vector3(0, 0, 0);
void Update()
{
if(transform.collider.bounds.Intersects(Teleporter_1.transform.collider.bounds))
{
Temp = Teleporter_2.position + Offset;
transform.position = Temp;
}
if (transform.collider.bounds.Intersects(Teleporter_2.transform.collider.bounds))
{
Temp = Teleporter_1.position + Offset;
transform.position = Temp;
}
}
}