Created
January 16, 2012 12:28
-
-
Save Azerothian/1620645 to your computer and use it in GitHub Desktop.
Intersections
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RaySceneQuery SceneQuery = _root.SceneManager.CreateRayQuery( | |
_camera.GetCameraToViewportRay( | |
inputReader.AbsoluteMouseX / (float)_renderWindow.Width, | |
inputReader.AbsoluteMouseY / (float)_renderWindow.Height) | |
, | |
0x40000000 | |
); | |
foreach (RaySceneQueryResultEntry result in SceneQuery.Execute()) | |
{ | |
if (result.SceneObject != null) | |
result.SceneObject.ShowBoundingBox = true; | |
//else if (result.worldFragment != null) | |
//PlayerNode.Position = result.worldFragment.SingleIntersection; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment