You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
385 B

  1. using UnityEngine;
  2. using System.Collections;
  3. public class checkpoint : MonoBehaviour {
  4. public GameObject respawnPoint;
  5. // Use this for initialization
  6. void Start () {
  7. }
  8. // Update is called once per frame
  9. void Update () {
  10. }
  11. void OnTriggerStay(Collider other) {
  12. if (other.tag == "Player") {
  13. other.transform.position = respawnPoint.transform.position;
  14. }
  15. }
  16. }