Wierd RaySceneQueries ...

pjcast

26-07-2006 23:17:06

I have an issue with RaySceneQueries. When I move/rotate the camera directly, it functions fine - picks the right object.

However, if I attach the camera to a scenenode, then after I rotate/pitch the cameraNode at all.. the next pick attempt will return my Camera as the selected iitem.. Translating the node works as expected, but any rotation, and it goes wacko.

My Code: look at the SingleItemPick (but the volume pick does it too)
https://www.wreckedgames.com/svn/visual ... eEditor.cs

Again doing:
mCamera.pitch( ... ) or
mCamera.yaw( ... )

Works. As does doing mcamerNode.translate (.. )

But, Doing:
mCameraNode.pitch( ... ) or
mCameraNode.yaw( ... )

Results in always picking the camera.

Another strange thing, is that I even set the query flags on the camera to be different from the query flags I'm picking for :/

Any help is appreciated.

Mwr

28-07-2006 15:08:40

Until now, I've been moving the camera directly but have been meaning to change over to moving the node.

Now having seen your post, I have started that change over and so far RaySceneQueries are working fine, but I'll do more tests before saying for sure.

So I'll let you know the results.

Edit: I take that back, it does find the camera; as the second object in the RaySceneQueryResult. The first object being the terrain, the second the camera and then the third the object that I actually clicked on.

pjcast

28-07-2006 17:53:28

Yeah, I don't have any terrain at the moment. The likely reason why I hit the camera first. AFAIK, this is not expected behavior, at least, in my C++ apps, I have never had this problem.

It would be a bit easier to be able to step into Ogre. I think something is not being updated correctly, but I may be wrong (I tried using node._update() after rotate/yaw to no avail).