Collision Choices Question

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
NoisyPerlin
Posts: 11
Joined: Sat Sep 03, 2005 2:52 pm

Collision Choices Question

Post by NoisyPerlin »

I'm fiddling around with Irrlicht, and I'd like to have a method of doing collision between the a mesh that the player controls, and the animated meshes of the various enemies. I'm looking for a collision solution, but I'm not sure what my best move would be. I could just use the aligned bounding box that comes as part of the mesh class, but I would think that that would result in a lot of false collisions being triggered if the mesh had an irregular shape. If there's a way to check that an arbitrary xyz point is inside a mesh, I could maybe do something that way, but I'm not sure if such a method exists and can be done efficiently. I've looked into using Newton or ODE, but that looks a bit difficult to integrate into Irrlicht, and it also seems to be overkill, since I just want reasonably accurate collision, and probably don't need actual physics right now. Could any of you with a bit more experience tell me what the best way is of doing efficient, reasonably accurate collisions? Thanks!
luckymutt
Posts: 453
Joined: Sun Mar 06, 2005 11:56 pm
Location: C-Ville

Post by luckymutt »

Just how wacky-shaped mesh are you talking about?
Without knowing what kind shape your mesh is, and consequently how the bounding box would be, I suppose one option might be to add a test scene node in the same position of your mesh area that you want collision, make it a child of your mesh, set the visibility to false, then do your collision between your player/camera, and the non-visible scene node.

Hope this helps.
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

Oct tree trinagle selector

maps are complex meshes like the demo of collision with a q3 map in the sdk
Post Reply