Jump to content
  • Advertisement
Sign in to follow this  
muimui1911

[suggestion] about collision detection

This topic is 4822 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

what is the best BOOK/BOOKS to read if I want to learn detect collision in game progarmming, giving me good concepts and learning samples? websites will do for me as well but I want both.

Share this post


Link to post
Share on other sites
Advertisement
I don't know of any books specifically for collision detection, however 3D Game Engine Design by David Eberly has quite a bit of information on the subject. Unfortunately, if you don't have extreme familiarity with advanced math, that book will be useless.

BTW, I would give further suggestions, however you didn't provide much information. Do you want 2D or 3D collision detection? Higly-accurated, approximated, or just bounding box?

Share this post


Link to post
Share on other sites
Quote:
Original post by nilkn
BTW, I would give further suggestions, however you didn't provide much information. Do you want 2D or 3D collision detection? Higly-accurated, approximated, or just bounding box?


What i am looking for.
1. 3D collision
2. accuracy....hmm....i dunno since i am new to this...I need to detect collision for myself in virtual environment with a house(apartment). so how accurate should it be? should I use AABB or just bounding box??


thanks for helping

Share this post


Link to post
Share on other sites
One book that I found rather useful is 'Real-time Collision Detection' by Christer Ericson.

Quote:

What i am looking for.
1. 3D collision
2. accuracy....hmm....i dunno since i am new to this...I need to detect collision for myself in virtual environment with a house(apartment). so how accurate should it be? should I use AABB or just bounding box??


3D collision detection comes in all kinds of flavours: The most simple one to implement is Sphere-based collision detection, its fast and easy but very inaccurate. (and i think not very suitable for your project)
If I understand you correctly, you want to navigate your camera and do collision detection between the camera and the house you navigating through?
If this is the case, I would suggest an approach based on Axis-Aligned BoundingBoxes. (most rooms (walls, ceilings) will be aligned with the worlds coordinate frame. If you think of the camera as a point, floating through your world. Collision detection between this point and the various AABBs containing the components of your 3D-house, is rather easy:
The only thing you'd have to test for is whether the point (being your camera) is inside one of those AABBs. If it is, compute the point where you've entered that AABB and place the camera back to that location.

If you want to detect collisions between that camera and the furniture you place inside your house, AABBs might not be the best choice (particularly when that furniture isn't aligned with the world's coordinate frame.) You could choose to use OBBs for those objects, or you could define the AABBs of that object in object-space and transform the location of you camera to object space and perform the same pointInsideAABB check I mentioned earlier.

For speeding up the collision detetion (e.g. when there are a large number of objects in your scene and checking al of them for intersection with your camera isn't fast enough), there are loads of different approaches to choose from. Google for Spatial Subdivision and you'll find the most common ones.

I hope this helps...

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!