Advertisement
Exin_Developments

Teleport

Oct 24th, 2016
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.29 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class Teleport : MonoBehaviour {
  5.  
  6.     public Vector3 Gate1Exit;
  7.  
  8.     void OnTriggerEnter(Collider other)
  9.     {
  10.  
  11.         if (other.tag == "Player")
  12.         {
  13.             other.transform.position = Gate1Exit;
  14.         }
  15.     }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement