UrhoSharp LeftCamera.GetScreenRay(...) confusion

I'm trying to create a Hololens application using UrhoSharp and am confused by the following line of code:

var ray = LeftCamera.GetScreenRay(0.5f, 0.5f);

The resource I'm using claims the two floats are "normalized screen coordinates" but I don't understand what this means in 3D. I believe it's creating a ray whose origin is at the origin of "LeftCamera", but pointing in what XYZ direction? Any help clearing this up is greatly appreciated. Thanks in advance!


Best Answer


  • utekaiutekai USMember ✭✭✭

    The coordinates of the screen are from 0 to 1 in up/down and left/left right.

    That code is saying shoot the ray into the center of the view.

  • LKeeneLKeene Member ✭✭
    edited March 15

    Thanks, but just to be clear:
    1) What is the origin of the ray?
    2) Is the ray identical (same origin and direction) to one from "RightCamera.GetScreenRay(0.5f,0.5f)"?

  • LKeeneLKeene Member ✭✭

    Great, thank you!

Sign In or Register to comment.