Jump to content
  • Advertisement
Sign in to follow this  
leonid

Knowing collision beforehand

This topic is 4043 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I'm trying to implement a 2D rigid-body system. Searching in Google, I learned some techniques to deal with collision detection & responses, but I'm still having no idea about this: It is possible to calculate after exactly which seconds the collision occurs? Thank you in advance.

Share this post


Link to post
Share on other sites
Advertisement
Because I wanted to implement an (almost)exact collision detection & response, since I am about to write a kind of physical simulation (sorry for not mentioning this before.)

And one of my teachers told me "maybe it is possible to anticipate collision stuffs beforehand since you know all the physical information given," and I wasn't able to find evidences to object his view.

Thanks for the reply.

Share this post


Link to post
Share on other sites
Interestingly, I spent quite a while working on much the same thing. My idea was that if you represent every object by equations, and their motion by equations as well, you can solve for the future state at an arbitrary time.

Unfortunately incorporating rotation results in some ghastly equations, which I couldn't solve, even for the case of two rotating, moving straight-line segments. If you want, I can post the relevant equations when I get time. But to do this you will need pretty damn good maths skills.

Share this post


Link to post
Share on other sites
The Continuous Colllision Detection article is a good start. It's still math heavy. At the moment, most of the interactive collision systems only work with linear motion.

http://citeseer.ist.psu.edu/redon02fast.html

In 2D, it's easier, but still not easy :)

Share this post


Link to post
Share on other sites
Olli: You mean no rotation right? If it was incorportaing rotation I would be impressed.

leonid: Here are some of the equations that I had knocked up while I was working on it. Y and T are the only variables. This sort of stuff _is_ feasible though, I had something which worked somewhat, unfortunately the maths(numerical methods for solving these equations) behind it wasn't really consistent enough (although sometimes it worked _perfectly_). Maybe I'll come back to it at some point, there's still some hope for it.
Note: When I said I couldn't solve them, I couldn't even find a reliable numerical solution :(








Share this post


Link to post
Share on other sites
Something no one seems to mention about continuous collision detection is how you actually use the results of your time-of-collision tests; you can't just drop sweep tests in as a replacement for static tests, you have to totally restructure your simulation so that it's more of an event-based, scheduler-driven thing.

Has anyone else had problems with this? It makes things much more complex (and slow, since you have to perform many collision tests, step things forward, and repeat) to the point where simply perfoming static tests 4x per frame seems more attractive..

Share this post


Link to post
Share on other sites
yes it is. I actually have the same problems you encounters. I tried to swap a descreet sampling method (slicing the movement into small intervals), and a swept test does require more work than just that.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!