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

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

  • 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