Skip to main content
gamedev.net
🔒 Locked

Collision detection algorithm suggestions?

Started by Guru2012 Apr 23, 2006 at 11:40 PM 0 replies 800+ views
Original Post
Guru2012
Guru2012
The scenario: My particle system includes things like sparks and flames, which should not be allowed to pass through movable objects like boxes and crates. However, particles obviously should be allowed to pass through each other. To implement this, I've subdivided collisions into two types, those between objects, and those between an object and a particle. I am trying to find a collision detection scheme which can handle high density clumped particles (in cases like flames from explosions) and low density movable objects (characters, crates, chairs, hat trees, etc). I'm trying to take advantage of the fact that particles cannot collide with other particles to dramatically reduce the amount of checking done, and I am also trying to take advantage of the sparse distribution of movable objects. Any ideas? I am already using a fixed depth quadtree for detecting terrain collisions, but when I tried doing this collision detection with the quadtree, the amount of bookkeeping required for the ray test slowed the tree down too much. So I'm looking for a secondary data structure.
deltadream
deltadream
You might try a "hit cache".

Find the poly's from the bounding box of your particle system and then test your ray-hit only with the triangles from the BB.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.