__bf_ddc__
14-06-2006 23:47:35
This might be wishful thinking...
But I have a scene that has raycast collision currently working properly... but when selecting an object I pop up some GUI elements and depending on where the mouse clicks to cast the raycast, the GUI popping up could perhaps cover up this selected object from the get-go... so I was thinking it'd be nice to rotate the camera to the point of collision contact, so the object would at least be in the middle of the screen when the GUI pops up.
If I can figure out the point in 3D space where this first collision takes place, then I can create a quaternion to rotate the camera to.
Is it possible to get this point of collision?
Thanks.
But I have a scene that has raycast collision currently working properly... but when selecting an object I pop up some GUI elements and depending on where the mouse clicks to cast the raycast, the GUI popping up could perhaps cover up this selected object from the get-go... so I was thinking it'd be nice to rotate the camera to the point of collision contact, so the object would at least be in the middle of the screen when the GUI pops up.
If I can figure out the point in 3D space where this first collision takes place, then I can create a quaternion to rotate the camera to.
Is it possible to get this point of collision?
Thanks.