1
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Lightbug.CharacterControllerPro.Demo
|
||||
{
|
||||
public class Teleporter : MonoBehaviour
|
||||
{
|
||||
public Transform target;
|
||||
|
||||
void OnTriggerEnter(Collider collider)
|
||||
{
|
||||
collider.transform.position = target.position;
|
||||
|
||||
if (collider.attachedRigidbody != null)
|
||||
collider.attachedRigidbody.position = target.position;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user