26 lines
530 B
C#
26 lines
530 B
C#
using UnityEngine;
|
|
|
|
public class GripperCollide : MonoBehaviour
|
|
{
|
|
[Tooltip("·Îº¿ ¸öÅë¿¡ »ç¿ëµÉ ű×")]
|
|
[SerializeField] private string robotBodyTag = "Robot";
|
|
|
|
public bool isTriggerRobot = false;
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
if (other.CompareTag(robotBodyTag))
|
|
{
|
|
isTriggerRobot = true;
|
|
}
|
|
}
|
|
|
|
private void OnTriggerExit(Collider other)
|
|
{
|
|
if (other.CompareTag(robotBodyTag))
|
|
{
|
|
isTriggerRobot = false;
|
|
}
|
|
}
|
|
}
|