ISceneCollisionManager behaving differently from 1.51 to 1.6
-
- Posts: 15
- Joined: Fri Oct 09, 2009 2:54 pm
ISceneCollisionManager behaving differently from 1.51 to 1.6
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."
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.
-
- Posts: 15
- Joined: Fri Oct 09, 2009 2:54 pm
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.)
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."