CameraUtil
This item only works when running on the client. Client
Properties
Instance
CameraUtil.Instance:
Camera
The current camera instance.
State<CFrame>
CameraUtil.State<CFrame>:
CameraCFrame
A State containing the current camera's CFrame.
State<Vector2>
CameraUtil.State<Vector2>:
ViewportSize
A State containing the current camera's ViewportSize.
State<number>
CameraUtil.State<number>:
ViewportSizeY
A Computed containing the current camera's ViewportSize.Y.
Functions
isOnScreen
CameraUtil.
isOnScreen
(
viewportMargin:
number?
--
The acceptable margin of viewport space to be considered on screen. Defaults to 50.
) →
(
boolean
,
--
Whether or not the position is on screen.
number
--
The distance the point is from the camera
)
A function that takes a world position and returns whether or not that point is on screen within the camera's viewport.