Collision- Triangle Selector, Node issue

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
Earl
Posts: 14
Joined: Tue Jan 23, 2007 10:33 pm
Location: San Angelo, Tx

Collision- Triangle Selector, Node issue

Post 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. :|
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

did you use addOctTreeSceneNode() for creating the node ???
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post 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
Earl
Posts: 14
Joined: Tue Jan 23, 2007 10:33 pm
Location: San Angelo, Tx

Post 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.
Post Reply