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

Collision detection fails occasionally #1

Closed
pedromartins opened this issue Mar 25, 2010 · 2 comments
Closed

Collision detection fails occasionally #1

pedromartins opened this issue Mar 25, 2010 · 2 comments

Comments

@pedromartins
Copy link
Owner

Collision detection occasionally fails.

Steps to reproduce:

  1. Go to a spot where you are surrounded by obstacles in one direction
  2. Go back and forth in that direction
  3. The ball eventually goes through one of the cubes

(Reported by Hok Poon)

@pedromartins
Copy link
Owner Author

My collision detection was initially calculated for uniform time steps (which would correspond to uniform distances travelled in the grid). When I made the animation time-dependent, the points that the ball passes through are more unpredictable, and that broke my assumptions for collision detection so I'll need to redesign it.

I'll do that when I get some free time. I'm surprised it actually works this well because it makes little sense with variable time steps.

@pedromartins
Copy link
Owner Author

"Fixed" by having a "snapping" integral, and a much more lenient collision detection that relies on the snapping. It should work in all cases, but it isn't elegant so I will try to redesign the whole system later.

This issue was closed.
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

No branches or pull requests

1 participant