Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FollowBehavior

A behavior that when attached to a mesh will follow a camera

since

5.0.0

Hierarchy

  • FollowBehavior

Implements

Index

Properties

attachedNodeSearch playground for attachedNode

attachedNode: Nullable<TransformNode>

Attached node of this behavior

defaultDistanceSearch playground for defaultDistance

defaultDistance: number

Default distance from eye to attached node, i.e. the sphere radius

fixedVerticalOffsetSearch playground for fixedVerticalOffset

fixedVerticalOffset: number

Fixed vertical position offset distance.

ignoreAngleClampSearch playground for ignoreAngleClamp

ignoreAngleClamp: boolean

Option to ignore angle clamping

ignoreCameraPitchAndRollSearch playground for ignoreCameraPitchAndRoll

ignoreCameraPitchAndRoll: boolean

If the behavior should ignore the pitch and roll of the camera.

ignoreDistanceClampSearch playground for ignoreDistanceClamp

ignoreDistanceClamp: boolean

Option to ignore distance clamping

interpolatePoseSearch playground for interpolatePose

interpolatePose: boolean

Set to false if the node should strictly follow the camera without any interpolation time

lerpTimeSearch playground for lerpTime

lerpTime: number

Rate of interpolation of position and rotation of the attached node. Higher values will give a slower interpolation.

maxViewHorizontalDegreesSearch playground for maxViewHorizontalDegrees

maxViewHorizontalDegrees: number

The horizontal angle from the camera forward axis to the owner will not exceed this value

maxViewVerticalDegreesSearch playground for maxViewVerticalDegrees

maxViewVerticalDegrees: number

The vertical angle from the camera forward axis to the owner will not exceed this value

maximumDistanceSearch playground for maximumDistance

maximumDistance: number

Max distance from eye to attached node, i.e. the sphere radius

minimumDistanceSearch playground for minimumDistance

minimumDistance: number

Min distance from eye to attached node, i.e. the sphere radius

orientToCameraDeadzoneDegreesSearch playground for orientToCameraDeadzoneDegrees

orientToCameraDeadzoneDegrees: number

The attached node will not reorient until the angle between its forward vector and the vector to the camera is greater than this value

pitchOffsetSearch playground for pitchOffset

pitchOffset: number

Pitch offset from camera (relative to Max Distance) Is only effective if ignoreCameraPitchAndRoll is set to true.

useFixedVerticalOffsetSearch playground for useFixedVerticalOffset

useFixedVerticalOffset: boolean

Ignore vertical movement and lock the Y position of the object.

verticalMaxDistanceSearch playground for verticalMaxDistance

verticalMaxDistance: number

Max vertical distance between the attachedNode and camera

Accessors

followedCamera

  • The camera that should be followed by this behavior

    Returns Nullable<Camera>

  • The camera that should be followed by this behavior

    Parameters

    Returns any

name

  • get name(): string
  • The name of the behavior

    Returns string

Methods

attachSearch playground for attach

  • Attaches the follow behavior

    Parameters

    • ownerNode: TransformNode

      The mesh that will be following once attached

    • Optional followedCamera: Camera

      The camera that should be followed by the node

    Returns void

detachSearch playground for detach

  • detach(): void
  • Detaches the behavior from the mesh

    Returns void

initSearch playground for init

  • init(): void
  • Initializes the behavior

    Returns void

recenterSearch playground for recenter

  • recenter(): void
  • Recenters the attached node in front of the camera on the next update

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Accessor
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method