Pages: [1]   Go Down
  Print  
Author Topic: DetectMouseCollision is not working or not correct  (Read 4870 times)
February 02, 2007, 11:01:53 am

DetectMouseCollision is used to check if the mouse is over an object yes or no.
The channel will return 1 if the mouse is over the object.
http://support.quest3d.com/index.php?title=DetectMouseCollision

However this only works correct is the correct camera is called before doing the DetectMouseCollision.

This problem occurs when you have your main 3d scene camera, and a Head Up Display (HUD) camera.
For example you want to check that the mouse is over an object in your 3d scene, but you do this after rendering the HUD. In that case the DetectMouseCollision will not work correct on that object.
2 Solution
- You call the DetectMouseCollision logic before rendering the HUD
- You call the 3d scene camera just again before the DetectMouseCollision, if you the check after the rendering of the HUD.
Pages: [1]   Go Down
  Print  
 
Jump to: