Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the raycast issue with the player's interact area #310

Open
nicemicro opened this issue Apr 17, 2021 · 0 comments
Open

Fix the raycast issue with the player's interact area #310

nicemicro opened this issue Apr 17, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@nicemicro
Copy link
Contributor

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.

@nicemicro nicemicro added the bug Something isn't working label Apr 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant