How is there a lookvector to mouse.hit?

I understand that the lookvector the a unit vector pointing where the object is looking, but how does a mouse have a lookvector? It doesn’t make much sense to me for a mouse to have a lookvector since its not a part.

1 Like

It’s the same as the direction of the mouse’s unit ray; it faces from the camera to the position.

The UnitRay page has more information on where it comes from, but I’m not sure where it’s documented that they’re the same thing.

4 Likes

I found the proof for this, it’s on the documentation for Mouse.Hit:

1 Like

It is the unit direction from the position of the mouse to the position of the target it collides with.