Shamba

On enter

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