Collision Choices Question
-
- Posts: 11
- Joined: Sat Sep 03, 2005 2:52 pm
Collision Choices Question
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!
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.
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.