Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c sharp teleporting

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Teleporting : MonoBehaviour
{
    public Transform teleportTarget;
    public GameObject thePlayer;

    void OnTriggerEnter(Collider other) 
    {
        thePlayer.transform.position = teleportTarget.transform.position;
    }

}
 
PREVIOUS NEXT
Tagged: #sharp #teleporting
ADD COMMENT
Topic
Name
4+4 =