- Home /
Teleporting device?
Hello, I want to set something up so that when Object A comes into contact with Object B, object A is transported to point D, how would I do this?
Comment
Answer by ckfinite · Nov 06, 2010 at 01:36 AM
You can directly access the position Vector3 of the object. You could do something like this:
var endObj:Transform;
function OnTriggerEnter(CollidedObj : Collider) {
CollidedObj.gameObject.transform.position = endObj.transform.position;
}