Constructs a new CMover instance that takes control of the specified camera with smooth movement and optional occlusion detection. Automatically binds to RenderStep and sets up occlusion checking if enabled.
The camera instance to control
Whether to enable occlusion detection system
OptionalfilterCallback: (newPosition: Vector3, newRotation: CFrame) => LuaTuple<[Vector3, CFrame]>Optional callback to filter position and rotation before applying to camera
Enables or disables the camera movement system. When false, the camera will not update its position or rotation.
ReadonlyDestroyedFires when Destroy() is called, or when the target Camera is destroyed.
ReadonlyInstanceThe camera instance being controlled by this CMover.
ReadonlyLookFires when the look target has been occluded or unoccluded for more than 250 milliseconds, providing debounced state changes.
ReadonlyLookIndicates whether the look target is currently occluded by an object. Updates immediately when occlusion state changes.
ReadonlyLookIndicates whether the look target has been occluded for more than 250 milliseconds, providing a debounced occlusion state.
ReadonlyLookFires immediately when the look target's occlusion state changes, providing both current and previous states.
ReadonlyMoveFires when the move target has been occluded or unoccluded for more than 250 milliseconds, providing debounced state changes.
ReadonlyMoveIndicates whether the move target is currently occluded by an object. Updates immediately when occlusion state changes.
ReadonlyMoveIndicates whether the move target has been occluded for more than 250 milliseconds, providing a debounced occlusion state.
ReadonlyMoveFires immediately when the move target's occlusion state changes, providing both current and previous states.
Enables or disables occlusion detection. When true, the system checks for objects between the camera and its targets.
Defines how the camera should react when occlusion is detected, such as passing through or avoiding obstacles.
Controls how the camera's position follows its target - either locked to a specific position or following within a radius.
Time constant for position smoothing in seconds. Lower values create snappier movement, higher values create smoother transitions. Set to 0 or negative for instant positioning.
Controls how the camera's rotation follows its target - either locked to look at a specific point or following a target.
Time constant for rotation smoothing in seconds. Lower values create snappier rotation, higher values create smoother turns. Set to 0 or negative for instant rotation.
Completely cleans up and destroys this CMover instance, unbinding from RenderStep and disconnecting all connections. After calling this method, the CMover will no longer affect the camera and all signals will be destroyed.
Makes the camera follow a BasePart while maintaining a maximum distance, creating a dynamic follow behavior. The camera stays within the specified radius and only moves when the target exceeds that distance.
The BasePart to follow
The maximum distance the camera can be from the target before it starts moving
Directs the camera to continuously look at a target, either a specific world position or a moving BasePart. The camera's rotation will smoothly track the target while position remains controlled independently.
The position or BasePart to look at
Moves the camera to match a specific CFrame, locking both position and rotation to the target's position and look direction.
Sets both PositionMode and RotationMode to Lock, making the camera precisely follow the given CFrame.
The CFrame defining where the camera should move and what direction it should face
Moves the camera to a specific world position while keeping the current rotation target unchanged. Only affects position - the camera's look direction remains controlled by the previous look target.
The 3D position where the camera should move
Locks the camera to move with a BasePart, matching both its position and orientation as it moves through the world. The camera will follow the part's position and look in the direction the part is facing.
The BasePart to track and move with
Configures the raycast parameters used for occlusion detection, allowing you to specify which objects to ignore when checking for obstacles. Can be applied to move target, look target, or both simultaneously.
Specifies which target's occlusion parameters to configure
Array of instances whose descendants should be ignored in occlusion raycasts
Whether to ignore water terrain when detecting occlusion
Whether to respect CanCollide property when detecting occlusion
A sophisticated camera controller that provides smooth camera movement, rotation, and occlusion handling. Manages camera positioning with configurable smoothing, target tracking, and intelligent obstacle avoidance.
See
CMoveWrapper