Mouse Pointer Aiming (Finally)

Subscribers:
1,260
Published on ● Video Link: https://www.youtube.com/watch?v=QFFXj8tjxoM



Game:
Unreal (1998)
Duration: 2:11
143 views
5


First normalize the mouse coordinates to the ranges -1 to 1.
Then build a RayVector.
X component MouseX times tan( verticalFOV / 2 ) times the aspect ratio.
Y component MouseY times tan( verticalFOV / 2 ).
Z component of 1.0.
Then normalize this vector and cast it from the Camera's position into world space and test the geometry's triangles for the nearest point. I move the point up an arbitrary amount and cast another ray straight down to get the final position.







Other Statistics

Unreal Statistics For Michael Lundgren

At this time, Michael Lundgren has 143 views for Unreal spread across 1 video. Less than an hour worth of Unreal videos were uploaded to his channel, less than 0.03% of the total video content that Michael Lundgren has uploaded to YouTube.