Define the interface of CameraService.

Implements

Constructors

Properties

canRotate: boolean = true

Control whether the VIVERSE CREATE Camera can rotate or not.

canSwitchPov: boolean = true

Control whether the camera's point of view can switch or not.

canZoom: boolean = true

Control whether the VIVERSE CREATE Camera can zoom or not.

maxZoomDistance: number = 0

Control the maximum distance between the VIVERSE CREATE third-person camera and the player.

minZoomDistance: number = 0

Control the minimum distance between the VIVERSE CREATE third-person camera and the player.

pov: PovTypes = CameraTypes.PovTypes.ThirdPerson

Retrieve the current camera's point of view.

Accessors

  • get activeCamera(): null | Entity
  • Retrieve the current active camera.

    Returns null | Entity

  • get isUsingExternalCamera(): boolean
  • Planned

    Retrieve the activation status of the Camera that was uploaded by the user.

    Returns boolean

Methods

  • Add the layer to the default camera in VIVERSE CREATE.

    Parameters

    • layerId: number

      Layer ID

    • Optionalorder: number

      Layer sorting: By default, it will be placed last.

    Returns void

  • Remove the layer from the default camera in VIVERSE CREATE.

    Parameters

    • layerId: number

      Layer ID

    Returns void

  • Switch the perspective to the provided camera.
    If no camera is provided, revert to the default camera mechanism in VIVERSE CREATE.

    Parameters

    • Optionalcamera: Entity

      This Entity must include the pc.CameraComponent.

    Returns void

  • Switch the point of view of the camera.

    Parameters

    Returns void