BoneLookController

Class used to make a bone look toward a point in space

see

http://doc.babylonjs.com/how_to/how_to_use_bones_and_skeletons#bonelookcontroller

Hierarchy

  • BoneLookController

Index

Constructors

constructor

  • Create a BoneLookController

    Parameters

    • mesh: AbstractMesh

      the mesh that the bone belongs to

    • bone: Bone

      the bone that will be looking to the target

    • target: Vector3

      the target Vector3 to look at

    • Optional options: object
      • Optional adjustPitch?: number
      • Optional adjustRoll?: number
      • Optional adjustYaw?: number
      • Optional maxPitch?: number
      • Optional maxYaw?: number
      • Optional minPitch?: number
      • Optional minYaw?: number
      • Optional pitchAxis?: Vector3
      • Optional slerpAmount?: number
      • Optional upAxis?: Vector3
      • Optional upAxisSpace?: Space
      • Optional yawAxis?: Vector3

    Returns BoneLookController

Properties

adjustPitch

adjustPitch: number

Used to make an adjustment to the pitch of the bone

adjustRoll

adjustRoll: number

Used to make an adjustment to the roll of the bone

adjustYaw

adjustYaw: number

Used to make an adjustment to the yaw of the bone

bone

bone: Bone

The bone that will be looking to the target

maxPitch

maxPitch: number

Gets or sets the maximum pitch angle that the bone can look to

maxYaw

maxYaw: number

Gets or sets the maximum yaw angle that the bone can look to

mesh

The mesh that the bone is attached to

minPitch

minPitch: number

Gets or sets the minimum pitch angle that the bone can look to

minYaw

minYaw: number

Gets or sets the minimum yaw angle that the bone can look to

slerpAmount

slerpAmount: number

The amount to slerp (spherical linear interpolation) to the target. Set this to a value between 0 and 1 (a value of 1 disables slerp)

target

target: Vector3

The target Vector3 that the bone will look at

upAxis

upAxis: Vector3

The up axis of the coordinate system that is used when the bone is rotated

upAxisSpace

upAxisSpace: Space

The space that the up axis is in - BABYLON.Space.BONE, BABYLON.Space.LOCAL (default), or BABYLON.Space.WORLD

Methods

update

  • update(): void
  • Update the bone to look at the target. This should be called before the scene is rendered (use scene.registerBeforeRender())

    Returns void

Generated using TypeDoc