[Refac] 작동방식 충돌에서 트리거로 수정
This commit is contained in:
parent
bec98caa29
commit
f052789ea2
@ -14,7 +14,7 @@ public class InteractionController : MonoBehaviour
|
|||||||
[SerializeField] HousingCanvasController housingCanvasController;
|
[SerializeField] HousingCanvasController housingCanvasController;
|
||||||
|
|
||||||
// 상호작용 가능한 사물 범위에 들어올 때
|
// 상호작용 가능한 사물 범위에 들어올 때
|
||||||
private void OnCollisionEnter(Collision other)
|
private void OnTriggerEnter(Collider other)
|
||||||
{
|
{
|
||||||
if (interactionLayerMask == (interactionLayerMask | (1 << other.gameObject.layer)))
|
if (interactionLayerMask == (interactionLayerMask | (1 << other.gameObject.layer)))
|
||||||
{
|
{
|
||||||
@ -25,9 +25,8 @@ public class InteractionController : MonoBehaviour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 사물에서 벗어날 때 UI 정리
|
// 사물에서 벗어날 때 UI 정리
|
||||||
private void OnCollisionExit(Collision other)
|
private void OnTriggerExit(Collider other)
|
||||||
{
|
{
|
||||||
if (interactionLayerMask == (interactionLayerMask | (1 << other.gameObject.layer)))
|
if (interactionLayerMask == (interactionLayerMask | (1 << other.gameObject.layer)))
|
||||||
{
|
{
|
||||||
|
BIN
Assets/LIN/Housing Copy.unity
(Stored with Git LFS)
BIN
Assets/LIN/Housing Copy.unity
(Stored with Git LFS)
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user