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.
mikkis
Posts: 64 Joined: Mon Jan 28, 2013 2:38 pm
Location: Fi
Post
by mikkis » Fri May 10, 2013 2:46 pm
Noticed that
Code: Select all
if(collMananger->getCollisionPoint(ray, selector, point, triangle, node))
{
sphere.getNode()->setPosition(point);
printf("> %s \n", node->getName());
}
gives sometime right and sometime wrong node-name. Sphere is positioned right.
But next code
Code: Select all
ISceneNode * selectedSceneNode = collMananger->getSceneNodeAndCollisionPointFromRay(ray, point, triangle);
if(selectedSceneNode)
{
sphere.getNode()->setPosition(point);
printf("> %s \n", selectedSceneNode->getName());
}
works right. Sphere is again positioned right, and node name is right.
CuteAlien
Admin
Posts: 9687 Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:
Post
by CuteAlien » Sat May 11, 2013 9:03 am
Sorry, we can't debug this without having an example to reproduce it.
mikkis
Posts: 64 Joined: Mon Jan 28, 2013 2:38 pm
Location: Fi
Post
by mikkis » Sat May 18, 2013 4:50 pm
Modified collision and scene loading demos to show this but didnt succeeded to reproduct the issue. Might be some code of mine which isnt quite right. But that doesnt matter as getSceneNodeAndCollisionPointFromRay() works (and seems that collision BB works ok too).
But if I have some time some day, I can create little testcase and if it still show wrong names, will post it here.