A problem with createOctTreeTriangleSelector function

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
Mobius
Posts: 14
Joined: Sun Dec 18, 2005 3:16 pm

A problem with createOctTreeTriangleSelector function

Post by Mobius »

I created a custom SceneNode and I used createTriangleSelector function for collisions:

[...]
selector = SceneManager->createTriangleSelector(&s_mesh, this);
[...]
collision->getCollisionPoint(ray, selector, v, t)
[...]

and all collisions work well! =)



But if I use createOctTreeTriangleSelector function:

[...]
selector = SceneManager->createOctTreeTriangleSelector(&s_mesh, this, 128);
[...]
collision->getCollisionPoint(ray, selector, v, t)
[...]

collisions don't work anymore... =(


Why?
Is it "normal"?
Probably I didn't understand how to use createOctTreeTriangleSelector
instead of createTriangleSelector with custom SceneNode... =(


Thanks! =)
Mobius
Posts: 14
Joined: Sun Dec 18, 2005 3:16 pm

Post by Mobius »

Update... =)


If I change

mat.transformBox(invbox); with mat.transformBoxEx(invbox);

in function COctTreeTriangleSelector::getTriangles (COctTreeTriangleSelector.cpp)

all collisions work well...

Bug? Feature? Error in my code?

Anyway, now my program seems to work! =)
Post Reply