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

At high speed, colision detection misses blocks #22

Open
Brockhold opened this issue Jan 30, 2024 · 0 comments
Open

At high speed, colision detection misses blocks #22

Brockhold opened this issue Jan 30, 2024 · 0 comments

Comments

@Brockhold
Copy link

With a sufficiently fast velocity (easily obtained with long runtimes), balls will phase through blocks entirely.
I speculate that this happens when the velocity of the ball is greater than one block size per frame, but I haven't read the code to see how collision checks work.
Checking for blocks between the last position and the current position would help prevent such warping.

schlagmichdoch added a commit to schlagmichdoch/yin-yang-pong that referenced this issue Feb 8, 2024
…tween frames (fixes constant speed); Rewrite collision logic to check vertical, horizontal and diagonal collisions (fixes vnglst#6, vnglst#18, vnglst#19, vnglst#21, vnglst#22)
schlagmichdoch added a commit to schlagmichdoch/yin-yang-pong that referenced this issue Feb 8, 2024
… between frames (fixes constant speed); Rewrite collision logic to check vertical, horizontal and diagonal collisions (fixes vnglst#6, vnglst#18, vnglst#19, vnglst#21, vnglst#22)
schlagmichdoch added a commit to schlagmichdoch/yin-yang-pong that referenced this issue Feb 9, 2024
… between frames (fixes constant speed); Rewrite collision logic to check vertical, horizontal and diagonal collisions (fixes vnglst#6, vnglst#18, vnglst#19, vnglst#21, vnglst#22)
schlagmichdoch added a commit to schlagmichdoch/yin-yang-pong that referenced this issue Feb 9, 2024
… between frames (fixes constant speed); Rewrite collision logic to check vertical, horizontal and diagonal collisions (fixes vnglst#6, vnglst#18, vnglst#19, vnglst#21, vnglst#22)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant