Collision node name

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
mikkis
Posts: 64
Joined: Mon Jan 28, 2013 2:38 pm
Location: Fi

Collision node name

Post by mikkis »

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:

Re: Collision node name

Post by CuteAlien »

Sorry, we can't debug this without having an example to reproduce it.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
mikkis
Posts: 64
Joined: Mon Jan 28, 2013 2:38 pm
Location: Fi

Re: Collision node name

Post by mikkis »

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