Thursday, May 16, 2019

Unity 3d make Teleport system in game full script by allunityscripts

Teleport System

Unity 3d make Teleport system

using UnityEngine;
using System.Collections;

public class Teleport : MonoBehaviour
{
    public GameObject ui;
    public GameObject objToTP;
    public Transform tpLoc;
    void Start()
    {
        ui.SetActive(false);
    }

    void OnTriggerStay(Collider other)
    {
        ui.SetActive(true);
        if ((other.gameObject.tag == "Player") && Input.GetKeyDown(KeyCode.E))
        {
            objToTP.transform.position = tpLoc.transform.position;
        }
    }
    void OnTriggerExit()
    {
        ui.SetActive(false);
    }
}

2 comments:

  1. A water splash pad can enhance the math skills in children. Buy one from Recreation Today now! water splash pad

    ReplyDelete
  2. I really found this to much informatics.It is good to see you verbalize from the heart and clarity on this important subject can be easily observed...

    dresses for girls

    ReplyDelete