ISceneCollisionManager behaving differently from 1.51 to 1.6

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
MarvLeonidasX
Posts: 15
Joined: Fri Oct 09, 2009 2:54 pm

ISceneCollisionManager behaving differently from 1.51 to 1.6

Post by MarvLeonidasX »

Is there a range limitation in 1.6 for GetSceneNodeFromRayBB() and GetSceneNodeFromScreenCoordinatesBB()? In Irrlicht 1.51 I was able to pick a node using either of the functions as long as the node was visible. In 1.6 the camera has to be REALLY close to the node (like within 200 or so) in order to pick it. I thought it was the node's bounding box but that's not the problem. Now, I know somebody will cry about me not posting code, but I am not at my computer right now and I just want to know if anyone else has experienced this.
"Mission failed: Your team was wiped out."
DavidJE13
Posts: 165
Joined: Tue Jan 09, 2007 7:17 pm

Post by DavidJE13 »

from what I recall, the first function you mention should only work within the length of the vector you give it, so are you giving it a vector with length 200? maybe this wasn't fully implemented in 1.5
Sundar
Posts: 84
Joined: Mon Jun 05, 2006 11:05 am

Post by Sundar »

I had the similar issue when switching over from irrlicht 1.5.1 to 1.6. The code which was picking the collided scene node on 1.5 didnt pick it in 1.6. I solved the issue by creating a emptyscenenode and made all the nodes needed to check for collision its child. and while checking for collision i passes the emptyscenenode as parameter which solved the issue.
MarvLeonidasX
Posts: 15
Joined: Fri Oct 09, 2009 2:54 pm

Post by MarvLeonidasX »

Thank you both for the responses.

To answer your question DavidJE13, I am getting my ray from getRayFromScreenCoordinates(), which according to the API returns a "Ray starting from the position of the camera and ending at a length of the far value of the camera at a position which would be behind the 2d screen coodinates." And I believe the default far value of the camera is 2000. I tried bumping it up to 10000 with no noticeable change. So I am stumped.

Sundar, I will try your suggestion when I get a chance (I'm in the middle of moving right now.)
"Mission failed: Your team was wiped out."
Post Reply