Page 1 of 1

Collision- Triangle Selector, Node issue

Posted: Sat Feb 24, 2007 10:23 am
by Earl
Still trying to get collision to go in my basic program.
I'm getting pretty close to making this work I think, haven't had much time to do work on it due to school...
The collision seems to be nearly set up, but I can't get past this error.

"No matching function to call for irr::scene::ISceneManager::createOctTreeTriangleSelector(irr::scene::IAnimatedMeshSceneNode*&, int)'

I'm trying to use an OctTreeTriangleSelector as in the examples, but my my model is a .obj and I can't seem to figure out what's up. I load the model using IAnimatedMesh and it has an AnimatedMeshSceneNode, which I guess match up right. I kinda know from reading that the OctTree node is supposed to be with the OctTree selector... Is there a selector for animated mesh nodes? Or is there a way to make an octtree node for my .obj? I'm totally lost here. :|

Posted: Sat Feb 24, 2007 1:24 pm
by Acki
did you use addOctTreeSceneNode() for creating the node ???

Posted: Sat Feb 24, 2007 1:32 pm
by vitek
Uh, that is because there is no function named createOctTreeTriangleSelector() that takes the parameters you are passing it... Have a look at the function signature in the docs. Notice that the method takes an IMesh* as the first parameter, not an IAnimatedMesh* or an IAnimatedMeshSceneNode*. You need to pass an IMesh*, or something convertable to an IMesh*, as the first parameter to createOctTreeTriangleSelector(). The collision example shows how to do exactly what you are trying...

Travis

Posted: Sun Feb 25, 2007 9:05 am
by Earl
Thanks man :D My headache is over...
I ended up using a plain triangle selector instead of the OctTree selector. I guess my next thing is to find out what formats can be loaded with IMesh* so I can use the OctTrees, as my areas are going to be large and detailed.
Ever so slowly getting the hang of this...
Thanks again.