fix: can't interact with head and roof

This commit is contained in:
timote koenig
2026-03-13 13:11:23 +01:00
parent 7d7b288b4f
commit 4f19d135df
4 changed files with 5516 additions and 4800 deletions

View File

@@ -32,6 +32,8 @@ public class WallInteractButton : MonoBehaviour
private Vector3 m_buttonPressedPos;
private bool m_isVisuallyPressed;
public PlayerHeadController headController;
private void Reset()
{
Collider col = GetComponent<Collider>();
@@ -49,7 +51,7 @@ public class WallInteractButton : MonoBehaviour
private void Update()
{
if (m_playerInRange && Keyboard.current != null && Keyboard.current[interactKey].wasPressedThisFrame)
if (!headController.isHoldingHead && m_playerInRange && Keyboard.current != null && Keyboard.current[interactKey].wasPressedThisFrame)
{
TryInteract();
}