Skip to content

Commit a2a979c

Browse files
fix: Interaction condition
1 parent 0f320cc commit a2a979c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Assets/Scripts/Interaction System/SelectionManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void Update()
6161

6262
interactable = selectionTransform.GetComponent<InteractableObject>();
6363

64-
if (interactable != null && (interactable.playerInRange || oneTimeInteraction) && !isInteracting)
64+
if (interactable != null && (interactable.playerInRange || oneTimeInteraction))
6565
{
6666
if (interactable != lastInteractable)
6767
{
@@ -72,7 +72,7 @@ void Update()
7272
interactable.GetComponent<Outline>().enabled = canHighlight;
7373
SetText(interactable.GetSelectionPrompt());
7474

75-
if (Input.GetKeyDown(KeyCode.E))
75+
if (Input.GetKeyDown(KeyCode.E) && !isInteracting )
7676
{
7777
Debug.Log("Interacting with " + interactable.name);
7878
interactable.Interact();

0 commit comments

Comments
 (0)