Class LookAt
java.lang.Object
net.ixdarklord.coolcatcanvas.api.client.armature.LookAt
A joint that turns to look at something. A living entity's joints follow where it looks; anything else (a turret
block, a statue's head, a held item) follows the nearest player in range unless given a target. Several joints can
share the turn:
lookAt("neck").weight(0.4F) and lookAt("head").weight(0.6F).
animator.lookAt("head").maxYaw(70).maxPitch(40);
animator.lookAt("turret").range(16).smoothing(0.25F);
animator.lookAt("eye").target(ctx -> someWorldPosition);
-
Method Summary
Modifier and TypeMethodDescriptionjoint()maxPitch(float degrees) The furthest it tilts up or down, in degrees.maxYaw(float degrees) The furthest it turns left or right, in degrees.range(double blocks) How near a player must be to be looked at, for things without a head of their own to follow.smoothing(float seconds) Seconds it takes to turn most of the way to a new direction; 0 snaps.target(Function<ArmatureContext, @Nullable net.minecraft.world.phys.Vec3> target) What to look at, in the world; null from the function looks ahead.weight(float weight) How much of the turn this joint takes, 0 to 1.
-
Method Details
-
joint
-
weight
How much of the turn this joint takes, 0 to 1. -
maxYaw
The furthest it turns left or right, in degrees. -
maxPitch
The furthest it tilts up or down, in degrees. -
smoothing
Seconds it takes to turn most of the way to a new direction; 0 snaps. Living entities' heads are already smooth. -
range
How near a player must be to be looked at, for things without a head of their own to follow. -
target
What to look at, in the world; null from the function looks ahead.
-