@rbxts/cmove-wrapper - v1.0.0
    Preparing search index...

    Class CMoveWrapper

    A static wrapper class that manages multiple CMover instances, associating each with a specific camera. Provides convenient factory methods for creating and retrieving CMover instances tied to cameras.

    CMover

    Index

    Constructors

    Properties

    ActiveMode: { Follow: 2; Lock: 1 } = ...

    Defines how the camera should behave when targeting a position or rotation.

    Type Declaration

    • ReadonlyFollow: 2

      Follows a target while maintaining a maximum distance

    • ReadonlyLock: 1

      Locks the camera to a specific position or rotation target

    OcclusionIgnoreTarget: { All: 1; LookTarget: 3; MoveTarget: 2 } = ...

    Specifies which target's occlusion parameters should be modified.

    Type Declaration

    • ReadonlyAll: 1

      Apply occlusion parameters to both move and look targets

    • ReadonlyLookTarget: 3

      Apply occlusion parameters only to the look target

    • ReadonlyMoveTarget: 2

      Apply occlusion parameters only to the move target

    OcclusionReaction: { Avoid: 3; None: 1; Passthrough: 2 } = ...

    Determines how the camera reacts when occlusion is detected between the camera and its targets.

    Type Declaration

    • ReadonlyAvoid: 3

      Camera avoids the occluding object by shifting to the left or right

    • ReadonlyNone: 1

      No reaction to occlusion, camera behavior remains unchanged

    • ReadonlyPassthrough: 2

      Camera passes through the occluding object by moving just beyond the occlusion point

    Methods

    • Retrieves a previously created CMover instance associated with the specified camera. Returns undefined if no CMover has been created for this camera via Wrap.

      Parameters

      • camera: Camera

        The camera whose CMover to retrieve

      Returns CMover | undefined

      The CMover instance for this camera, or undefined if none exists

    • Creates and wraps a camera with a new CMover instance, storing it for later retrieval. The created CMover is automatically registered and can be retrieved using GetMover.

      Parameters

      • camera: Camera

        The camera instance to wrap and control

      • OptionalocclusionChecking: boolean

        Whether to enable occlusion detection for this CMover

      • OptionalfilterCallback: (newPosition: Vector3, newRotation: CFrame) => LuaTuple<[Vector3, CFrame]>

        Optional callback to filter camera position and rotation each frame

      Returns CMover

      The newly created CMover instance controlling the specified camera