Page 1 of 1

ISceneCollisionManager behaving differently from 1.51 to 1.6

Posted: Tue Oct 20, 2009 5:31 am
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.

Posted: Tue Oct 20, 2009 8:21 am
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

Posted: Tue Oct 20, 2009 7:13 pm
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.

Posted: Wed Oct 21, 2009 6:38 am
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.)