A follow camera takes a mesh as a target and follows it as it moves. Both a free camera version followCamera and an arc rotate version arcFollowCamera are available.
Height Offset Limit
Rotation Offset Limit
UpVector From Rotation
Height Offset Limit
Rotation Offset Limit
Instantiates the follow camera.
Define the name of the camera in the scene
Define the position of the camera
Define the scene the camera belong to
Optional lockedTarget: Nullable<AbstractMesh>
Define the target of the camera
AccelerationSearch playground for cameraAcceleration
Define how fast the camera can accelerate to follow it s target.
DirectionSearch playground for cameraDirection
Define the current direction the camera is moving to
RotationSearch playground for cameraRotation
Define the current rotation the camera is rotating to
OffsetSearch playground for heightOffset
Define a height offset between the camera and the object it follows. It can help following an object from the top (like a car chasing a plane)
Parent ScalingSearch playground for ignoreParentScaling
Gets or sets a boolean indicating that the scaling of the parent hierarchy will not be taken in account by the camera
Defines the input associated with the camera.
Rotation SpeedSearch playground for inverseRotationSpeed
Speed multiplier for inverse camera panning
RotationSearch playground for invertRotation
Reverses mouselook direction to 'natural' panning as opposed to traditional direct panning
TargetSearch playground for lockedTarget
Define the target of the camera.
Height Offset LimitSearch playground for lowerHeightOffsetLimit
Minimum allowed height of camera position relative to target object. This can help limiting how the Camera is able to move in the scene.
Radius LimitSearch playground for lowerRadiusLimit
Minimum allowed distance of the camera to the axis of rotation (The camera can not get closer). This can help limiting how the Camera is able to move in the scene.
Rotation Offset LimitSearch playground for lowerRotationOffsetLimit
Minimum allowed angle to camera position relative to target object. This can help limiting how the Camera is able to move in the scene.
Camera SpeedSearch playground for maxCameraSpeed
Define the speed limit of the camera following an object.
Rotation ConstraintSearch playground for noRotationConstraint
Add constraint to the camera to prevent it to move freely in all directions and around all axis.
Distance the follow camera should follow an object at
rotationSearch playground for rotation
Define the current rotation of the camera
OffsetSearch playground for rotationOffset
Define a rotation offset between the camera and the object it follows
QuaternionSearch playground for rotationQuaternion
Define the current rotation of the camera as a quaternion to prevent Gimbal lock
Define the current speed of the camera
UpVector From RotationSearch playground for updateUpVectorFromRotation
When set, the up vector of the camera will be updated by the rotation of the camera
Height Offset LimitSearch playground for upperHeightOffsetLimit
Maximum allowed height of camera position relative to target object. This can help limiting how the Camera is able to move in the scene.
Radius LimitSearch playground for upperRadiusLimit
Maximum allowed distance of the camera to the axis of rotation (The camera can not get further). This can help limiting how the Camera is able to move in the scene.
Rotation Offset LimitSearch playground for upperRotationOffsetLimit
Maximum allowed angle to camera position relative to target object. This can help limiting how the Camera is able to move in the scene.
ControlSearch playground for attachControl
Attach the input controls to a specific dom element to get the input from.
Optional noPreventDefault: boolean
Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
ControlSearch playground for detachControl
Detach the current controls from the specified dom element.
Class NameSearch playground for getClassName
Gets the camera class name.
the class name
Front PositionSearch playground for getFrontPosition
Gets the position in front of the camera at a given distance.
The distance from the camera we want the position to be
TargetSearch playground for getTarget
Return the current target position of the camera. This value is expressed in local space.
the target position
TargetSearch playground for setTarget
Defines the target the camera should look at.
Defines the new target as a Vector
StateSearch playground for storeState
Store current camera state of the camera (fov, position, rotation, etc..)