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

Find examples in Playground
  • 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

Find examples in Playground
adjustPitch: number

Used to make an adjustment to the pitch of the bone

adjustRoll

Find examples in Playground
adjustRoll: number

Used to make an adjustment to the roll of the bone

adjustYaw

Find examples in Playground
adjustYaw: number

Used to make an adjustment to the yaw of the bone

bone

Find examples in Playground
bone: Bone

The bone that will be looking to the target

maxPitch

Find examples in Playground
maxPitch: number

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

maxYaw

Find examples in Playground
maxYaw: number

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

mesh

Find examples in Playground

The mesh that the bone is attached to

minPitch

Find examples in Playground
minPitch: number

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

minYaw

Find examples in Playground
minYaw: number

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

slerpAmount

Find examples in Playground
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

Find examples in Playground
target: Vector3

The target Vector3 that the bone will look at

upAxis

Find examples in Playground
upAxis: Vector3

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

upAxisSpace

Find examples in Playground
upAxisSpace: Space

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

Methods

update

Find examples in Playground
  • 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