PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

Origin

Mouse

CFrame

A DataType/CFrame positioned at the Workspace/CurrentCamera and oriented toward the Mouse's 3D position.

Mouse/UnitRay starts at the same position as Origin, and extends for a stud in the same direction.

local unitRay = mouse.UnitRay
local origin = mouse.Origin
-- unitRay.Direction = origin.p
-- unitRay.Direction ≈ origin.lookVector

For the position of the Mouse in 3D space, see Mouse/Hit.