Class CameraSystem

Drives the camera modes.

Methods

  • Sets the camera to a static view.

    Returns void

  • Gets a reference to the current camera mode object.

    Returns CameraMode

    Camera mode.

  • Returns true if the camera system is enabled.

    Returns boolean

  • Register a callback to be run after the camera mode has generated a camera transform. Callback can return a modified CameraTransform to update the camera for this frame.

    Parameters

    Returns (() => void)

    Clean up function to unregister callback

      • (): void
      • Returns void

  • Sets whether or not the camera system is enabled. Disable the camera system if custom camera code is being used.

    Parameters

    • enabled: boolean

    Returns void

  • Set the camera's field-of-view.

    Parameters

    • cameraType: CharacterCameraType
    • fieldOfView: number

      Field of view.

    • immediate: boolean = false

      If true, goes directly to the FOV without springing towards it.

    Returns void

  • Set the current camera mode.

    Parameters

    Returns void

  • Sets a callback function that is called when the camera mode is cleared. This is useful for defaulting the camera system to a specific camera mode. Only one callback can be set.

    Leaving out the onClearCallback parameter will clear the callback.

    Parameters

    Returns void