opensuspect/opensuspect-legacy

Fix the raycast issue with the player's interact area

Opened this issue · 0 comments

In the current implementation, raycast is used to check whether an interactpoint that entered the player's interact area is in sight or not (see: res://assets/player/interactarea.gd). However, if the raycast fails to hit the interactpoint (due to a wall being between the player and the interactpoint), there is no repeated check while the interactpoint is inside the interact area, so the interaction will never be possible.
Fixing this bug might be done by keeping a list of interactpoints in range but not in sight and periodically testing whether the point got in sight.