BoneLookController

Description

class BoneLookController

Constructor

new BoneLookController(mesh, bone, target, options)

Create a BoneLookController

Parameters

Name Type Description
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

Members

target : Vector3

The target Vector3 that the bone will look at.

mesh : AbstractMesh

The mesh that the bone is attached to.

bone : Bone

The bone that will be looking to the target.

upAxis : Vector3

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

upAxisSpace : Space

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

adjustYaw : number

Used to make an adjustment to the yaw of the bone.

adjustPitch : number

Used to make an adjustment to the pitch of the bone.

adjustRoll : number

Used to make an adjustment to the roll of the bone.

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).

minYaw : number

Get/set the minimum yaw angle that the bone can look to.

maxYaw : number

Get/set the maximum yaw angle that the bone can look to.

minPitch : number

Get/set the minimum pitch angle that the bone can look to.

maxPitch : number

Get/set the maximum pitch angle that the bone can look to.

Methods

update() void

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