Hololens/Lib/Collisions.cs
//###################################################################################################################
/// <summary>
/// Synchronous method for calling ray hit test. Must be called in update application method.
/// In case of null ray value, return (9,9,9) vector.
/// </summary>
/// <param name="camera"> the camera where the hit test start, UrhoSharp CullingCamera recommanded </param>
/// <param name="x"> ray position on x axis from left up corner of camera view, normalised value </param>
/// <param name="y"> ray position on y axis from left up corner of camera view, normalised value </param>
/// <returns> the world position of the hit. If ray is null, return a vector of value (9,9,9) </returns>
Synchronous method for calling ray hit test. Must be called in update application method.
In case of null ray value, return (9,9,9) vector.
Synchronous method for calling ray hit test . Must be called in update application method . In case of null ray value return ( 9 9 9 ) vector .
public Vector3 RayHitPosition(Camera camera, float x, float y)
        {
            var ray = RayHit(camera, x, y); 
            if (ray != null)
            {
                return ray.Value.Position;
            }
            else
            {
                return new Vector3(9,9,9);
            }
        }
public Vector3 RayHitPosition ( Camera camera , float x , float y ) { var ray = RayHit ( camera , x , y ) ; if ( ray != null ) { return ray . Value . Position ; } else { return new Vector3 ( 9 , 9 , 9 ) ; } }
Synchronous method for calling ray hit test.
Synchronous method for calling ray hit test .
// main ray hit method
the world position of the hit. If ray is null, return a vector of value (9,9,9)
the world position of the hit . If ray is null return a vector of value ( 9 9 9 )
camera
Camera
the camera where the hit test start, UrhoSharp CullingCamera recommanded
the camera where the hit test start UrhoSharp CullingCamera recommanded
x
float
ray position on x axis from left up corner of camera view, normalised value
ray position on x axis from left up corner of camera view normalised value
y
float
ray position on y axis from left up corner of camera view, normalised value
ray position on y axis from left up corner of camera view normalised value