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

Hit detection is wrong for certain shape screens #36

Closed
TodePond opened this issue Jul 1, 2022 · 3 comments
Closed

Hit detection is wrong for certain shape screens #36

TodePond opened this issue Jul 1, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@TodePond
Copy link
Owner

TodePond commented Jul 1, 2022

It thinks you're touching the corner when you aren't really

@TodePond TodePond added the bug Something isn't working label Jul 1, 2022
@TodePond
Copy link
Owner Author

TodePond commented Jul 1, 2022

This is caused by pity! If I turn off pity outside the screen, this bug doesn't exist.

Perhaps related to #29 or pity not scaling properly

@TodePond
Copy link
Owner Author

TodePond commented Jul 1, 2022

It's also because some positions return [0, 0] during hit detection, which gets incorrectly picked up as the top-left corner

@TodePond
Copy link
Owner Author

TodePond commented Jul 1, 2022

AH! It's because I made NaNs get changed into 0. I should change them into Infinity or something instead? If I were to make the engine again, I would put checks in for NaN. But for now, I'll just avoid it.

@TodePond TodePond closed this as completed Jul 1, 2022
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