Advertisement
Guest User

teleport

a guest
Nov 26th, 2015
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. public class Teleport:MonoBehaviour
  2. {
  3. public Transform destination;
  4.  
  5. void Update()
  6. {
  7. if (Input.GetKeyUp(KeyCode.Space))
  8. {
  9. transform.position = destination.position;
  10. }
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement