Collision detection for many SceneNodes

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
r2d2
Posts: 211
Joined: Mon Nov 24, 2003 5:22 pm

Collision detection for many SceneNodes

Post by r2d2 »

I played around with Irrlichts collisiondetection and noticed that creating CollisionResponseAnimators for every single SceneNode ist definitely not a good way for doing collision detection on many SceneNodes (100-200). Currently i just want to test wether the nodes collided with the world (Q3 Octree), but later on i will need a few more collision test cause of projectiles and stuff like that.

Is there an easier and especially faster way of doing that, while just using Irrlichts functions or do i have to write my own collision testing code (using simplyfied volumes for collision checks)? Or should ODE/Newton do the job (i doubt that they will be faster cause they are physics engines but i am not sure, perhaps any one else knows whether they are faster than the Irrlicht CollisionResponseAnimator).

thx 4 any help ;)

greetz
r2
R2D2's Irrlicht Mods
Messed up with my database so the page is not working at the moment -.-
CPU: Core 2 Quad Q6700RAM: 4096 mb Graphics: Radeon 4850 512mb Sound: on board InternetConnection: DSL
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

I wouldn't use a phyiscs lib just for collision detection. I am using ODE, works fine (in most cases), but I haven't tried really big scenes yet. Initializing can take some time with lots of trimeshes. If you don't want to have the realistic behaviour of a physics engine I would stick to Irrlicht for collision detection.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

Don't go literaly doing all the collision detection. Try distributing the space in cells, perhaps, and test the collisions you want to detect to the objects that are inside your cell. That saves up calculations.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Post Reply