Sign in to follow this  
MohammadAhmed

Real - time collision detection

Recommended Posts

hello every one.

I had bought real-time collision detection book , but the problem is that this book author says that he did not deal with collision response ??? I know that collision response is much easier that colliosion detection but what can I do know after I had know that this book don't deal with response to collision ??? any help of books ??

Share this post


Link to post
Share on other sites
Collision response is game-dependent and, inside a game, entity-dependent.
Consider the following examples:[list=1]
[*]Billiard. Balls hit each other as regular rigid bodies.
[*]A ghost collides with nothing, but cannot go through the cage obtained by the spell "ghost trap" (conditional collision response on the same entity!)
[*]Player entity just stops hitting a wall, but slides along if possible.
[*]A blob of goo deforms dynamically on hitting something
[*]Bots won't go through anything the player cannot pass. Additionally, they won't go through rigid bodies marked as BOT_COLLISION. Or perhaps they can go through some things even though the player cannot.
[/list]
So in general, I'm afraid you're better to stop reading and start experimenting.
For a more real-world example, I have an entity in my game which behaves more or less like the player in terms of collision detection. Additionally, they collide with FALL_SENSOR geometry. Every time an hit is reported, a random chance is generated. If the chance is less than 20%, they will just go through it. Edited by Krohm

Share this post


Link to post
Share on other sites
[quote name='Krohm' timestamp='1342865556' post='4961624']
So in general, I'm afraid you're better to stop reading and start experimenting.
[/quote]

thanks but what you mean ??

Share this post


Link to post
Share on other sites
What you probably want is some sort of sequential-impulse based method because it is the easiest to implement and gives pretty good results (most big physics engines use it). Here are some links to get you started.

[url="http://www.digitalrune.com/Portals/0/Documents/A%20Unified%20Framework%20for%20Rigid%20Body%20Dynamics.pdf"]A Unified Framework for Rigid Body Dynamics[/url]
[url="http://twvideo01.ubm-us.net/o1/vault/gdc09/slides/04-GDC09_Catto_Erin_Solver.pdf"]Erin Catto's GDC 2010 Presentation on Constraint Solving[/url]

If you want some code examples, the Box2d, Chipmunk, and Bullet physics libraries all use this method of solving constraints.

Share this post


Link to post
Share on other sites
thanks , the last question is what is the good references for rreal-time collision detection book and the basics I should know so that i can understand collision detection better

Share this post


Link to post
Share on other sites
Most modern collision systems will use some variant of the GJK algorithm to detect collisions between convex shapes - it is extremely generic and can be used for everything from spheres to convex polyhedra. Casey at Molly Rocket has a really good video presentation about GJK [url="http://mollyrocket.com/9441"]here[/url].

GJK has a companion algorithm called EPA (Expanding Polytope Algorithm) which takes the output of GJK and refines the collision point so that it lies on the boundary of the convex shape. [url="http://www.codezealot.org/archives/180"]Here[/url] is a pretty decent explanation of the algorithm in 2D and it easily generalizes to 3D.

Other than that, the Real Time Collision Detection book is a pretty comprehensive collection of the algorithms for collision detection. Christer Ericson doesn't explain everything in the greatest detail, but you can find more info in the references which are noted in the book.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this