ThirdPersonCameraControlsWrapper class
This class is used to implement third person camera mode.
The controls use mouse movements to rotate the camera around the target object; By default the conttrols controller will enter pointer lock mode when the user clicks on the canvas. To disable this behavior set the usePointerLock
property to false on the controls controller.
The behavior of the controls can be customized by passing a ThirdPersonCameraControlsWrapperParams object to the constructor
The meaning of object
& target
options is intepreted as follows:
-
The
object
is typically set to the camera object being controlled -
The
target
is the object that the camera will follow from the given maxZoomOut distance
Signature:
export declare class ThirdPersonCameraControlsWrapper extends ControlsAbstract
Extends: ControlsAbstract
Remarks
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the ThirdPersonCameraControlsWrapper
class.
Properties
Property |
Modifiers |
Type |
Description |
---|---|---|---|
{ dt: number; a: number; } | |||
boolean |
Returns true if the controls are active, false otherwise | ||
number | |||
number | |||
Vector3 | |||
Controller |
The controller used to translate mouse movements into camera rotations | ||
boolean | |||
boolean | |||
number |
Represents the vertical offset from the target object | ||
{ x: boolean; y: boolean; } |
Used to lock the camera movement on a specific axis | ||
number |
Represents the maximum distance from the target object | ||
number | |||
"position" | "orbit" | |||
boolean |
Returns true if the controls are using pointer lock, false otherwise |
Methods
Method |
Modifiers |
Description |
---|---|---|