Class BoneLookController
Hierarchy
- BoneLookController
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Create a BoneLookController
Parameters
mesh: TransformNode
the TransformNode 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: { adjustPitch?: number; adjustRoll?: number; adjustYaw?: number; maxPitch?: number; maxYaw?: number; minPitch?: number; minYaw?: number; pitchAxis?: Vector3; slerpAmount?: number; upAxis?: Vector3; upAxisSpace?: Space; yawAxis?: Vector3 }
optional settings:
- maxYaw: the maximum angle the bone will yaw to
- minYaw: the minimum angle the bone will yaw to
- maxPitch: the maximum angle the bone will pitch to
- minPitch: the minimum angle the bone will yaw to
- slerpAmount: set the between 0 and 1 to make the bone slerp to the target.
- upAxis: the up axis of the coordinate system
- upAxisSpace: the space that the up axis is in - Space.BONE, Space.LOCAL (default), or Space.WORLD.
- yawAxis: set yawAxis if the bone does not yaw on the y axis
- pitchAxis: set pitchAxis if the bone does not pitch on the x axis
- adjustYaw: used to make an adjustment to the yaw of the bone
- adjustPitch: used to make an adjustment to the pitch of the bone
- adjustRoll: used to make an adjustment to the roll of the bone
Optional adjust
Pitch?: number Optional adjust
Roll?: number Optional adjust
Yaw?: number Optional max
Pitch?: number Optional max
Yaw?: number Optional min
Pitch?: number Optional min
Yaw?: number Optional pitch
Axis?: Vector3 Optional slerp
Amount?: number Optional up
Axis?: Vector3 Optional up
Axis Space?: Space Optional yaw
Axis?: Vector3
Returns BoneLookController
Properties
adjust PitchSearch playground for adjustPitch
Used to make an adjustment to the pitch of the bone
adjust RollSearch playground for adjustRoll
Used to make an adjustment to the roll of the bone
adjust YawSearch playground for adjustYaw
Used to make an adjustment to the yaw of the bone
boneSearch playground for bone
The bone that will be looking to the target
meshSearch playground for mesh
The TransformNode that the bone is attached to Name kept as mesh for back compatibility
slerp AmountSearch playground for slerpAmount
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)
targetSearch playground for target
The target Vector3 that the bone will look at
up AxisSearch playground for upAxis
The up axis of the coordinate system that is used when the bone is rotated
up Axis SpaceSearch playground for upAxisSpace
The space that the up axis is in - Space.BONE, Space.LOCAL (default), or Space.WORLD
Accessors
max Pitch
Gets or sets the maximum pitch angle that the bone can look to
Returns number
Gets or sets the maximum pitch angle that the bone can look to
Parameters
value: number
Returns void
max Yaw
Gets or sets the maximum yaw angle that the bone can look to
Returns number
Gets or sets the maximum yaw angle that the bone can look to
Parameters
value: number
Returns void
min Pitch
Gets or sets the minimum pitch angle that the bone can look to
Returns number
Gets or sets the minimum pitch angle that the bone can look to
Parameters
value: number
Returns void
min Yaw
Gets or sets the minimum yaw angle that the bone can look to
Returns number
Gets or sets the minimum yaw angle that the bone can look to
Parameters
value: number
Returns void
Methods
updateSearch playground for update
Update the bone to look at the target. This should be called before the scene is rendered (use scene.registerBeforeRender())
Returns void
Class used to make a bone look toward a point in space
https://doc.babylonjs.com/how_to/how_to_use_bones_and_skeletons#bonelookcontroller