Heroes_of_Hiis/Assets/Project Files/Scripts/Shumpei/EnableJoyStick.cs

28 lines
543 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnableJoyStick : MonoBehaviour
{
private MeshCollider _collider;
public GameObject LocomotionSystem;
// Start is called before the first frame update
void Start()
{
_collider = GetComponent<MeshCollider>();
LocomotionSystem.SetActive(false);
}
private void OnTriggerEnter(Collider other)
{
if (other.tag == "Hand")
{
LocomotionSystem.SetActive(true);
}
}
}