Chulein
23-09-2008 13:35:59
Hello.
Im having a problem when using the RaySceneQuery execute() method.
I got a program where i can mousepick objects on a flat terrain, and also i get the exact position on the flat terrain. to do this i use the ray pick example.
similar code.
this is currently working great in the program, but the following error occured as i wanted to move on and use the terrainmanager
" scenemanager.SetWorldGeometry("terrain.cfg") ".
mousepicking and coordinate updates still works great when loading "terrain.cfg". but the problem occurs when i navigate close to the ground terrain, and an ray shoots out into the "sky/nothing/empty". I think its because the "camera" is inside the "terrains" bounding box or something, because its not a problem if i use ray into nothing when im far away from the terrain.cfg..
i get the message:
on line:
Im using VS Pro 2005 /C# Express 2005
Mogre 1.4.6
anybody knows how to fix this?
Thanks:)
Im having a problem when using the RaySceneQuery execute() method.
I got a program where i can mousepick objects on a flat terrain, and also i get the exact position on the flat terrain. to do this i use the ray pick example.
similar code.
float scrx = (float)e.X / Viewport.ActualWidth;
float scry = (float)e.Y / Viewport.ActualHeight;
Ray ray = mCamera.GetCameraToViewportRay(scrx, scry);
RaySceneQuery query = mSceneMgr.CreateRayQuery(ray);
query.SetSortByDistance(true);
RaySceneQueryResult result;
result = query.Execute();
itr = result.Begin();
this is currently working great in the program, but the following error occured as i wanted to move on and use the terrainmanager
" scenemanager.SetWorldGeometry("terrain.cfg") ".
mousepicking and coordinate updates still works great when loading "terrain.cfg". but the problem occurs when i navigate close to the ground terrain, and an ray shoots out into the "sky/nothing/empty". I think its because the "camera" is inside the "terrains" bounding box or something, because its not a problem if i use ray into nothing when im far away from the terrain.cfg..
i get the message:
An unhandled exception of type 'System.StackOverflowException' occurred in Mogre.dll
on line:
result = query.Execute();
Im using VS Pro 2005 /C# Express 2005
Mogre 1.4.6
anybody knows how to fix this?
Thanks:)