class
CitizenAnimationHelper
public sealed class CitizenAnimationHelper : Component Used to control the Citizen animation state. You don't have to use this to animate your citizen avatar, but our aim is to put everything you need in this class, so you can easily see what variables are available.
Constructors
CitizenAnimationHelper() Properties
| Name | Type | Description |
|---|---|---|
Target | SkinnedModelRenderer | The skinned model renderer that we'll apply all parameters to. |
EyeSource | GameObject | Where are the eyes of our character? |
Height | Single? | How tall are we? |
LookAtEnabled | Boolean | Are we looking at something? Useful for stuff like cutscenes, where you want an NPC to stare at you. |
LookAt | GameObject | Which GameObject should we be looking at? |
EyesWeight | Single | |
HeadWeight | Single | |
BodyWeight | Single | |
IkLeftHand | GameObject | IK will try to place the limb where this GameObject is in the world. |
IkRightHand | GameObject | |
IkLeftFoot | GameObject | |
IkRightFoot | GameObject | |
EyeWorldTransform | Transform | The transform of the eyes, in world space. This is worked out from EyeSource is it's set. |
AimAngle | Rotation | Where are we aiming? |
AimEyesWeight | Single | The weight of the aim angle, but specifically for the Citizen's eyes. |
AimHeadWeight | Single | The weight of the aim angle, but specifically for the Citizen's head. |
AimBodyWeight | Single | The weight of the aim angle, but specifically for the Citizen's body. |
MoveRotationSpeed | Single | How much the character is rotating in degrees per second, this controls feet shuffling. If rotating clockwise this should be positive, if rotating counter-clockwise this should be negative. |
FootShuffle | Single | |
DuckLevel | Single | The scale of being ducked (crouched) (0 - 1) |
VoiceLevel | Single | How loud are we talking? |
IsSitting | Boolean | Are we sitting down? |
IsGrounded | Boolean | Are we on the ground? |
IsSwimming | Boolean | Are we swimming? |
IsClimbing | Boolean | Are we climbing? |
IsNoclipping | Boolean | Are we noclipping? |
IsWeaponLowered | Boolean | Is the weapon lowered? By default, this'll happen when the character hasn't been shooting for a while. |
HoldType | HoldTypes | What kind of weapon are we holding? |
Handedness | Hand | What's the handedness of our weapon? Left handed, right handed, or both hands? This is only supported by some holdtypes, like Pistol, HoldItem. |
MoveStyle | MoveStyles | We can force the model to walk or run, or let it decide based on the speed. |
SpecialMove | SpecialMoveStyle | We can force the model to have a specific movement state, instead of just running around. LedgeGrab is good for shimmying across a ledge. Roll is good for a platformer game where the character is rolling around continuously. Slide is good for a shooter game or a platformer where the character is sliding. |
Sitting | SittingStyle | How are we sitting down? |
SittingOffsetHeight | Single | How far up are we sitting down from the floor? |
SittingPose | Single | From 0-1, how much are we actually sitting down. |
Methods
Void ProceduralHitReaction(DamageInfo info, Single damageScale = 1, Vector3 force = null) Void WithLook(Vector3 lookDirection, Single eyesWeight = 1, Single headWeight = 1, Single bodyWeight = 1) Have the player look at this point in the world
Void WithVelocity(Vector3 Velocity) Have the player animate moving with a set velocity (this doesn't move them! Your character controller is responsible for that)
Velocity Void WithWishVelocity(Vector3 Velocity) Animates the wish for the character to move in a certain direction. For example, when in the air, your character will swing their arms in that direction.
Velocity Void TriggerJump() Triggers a jump animation
Void TriggerDeploy() Triggers a weapon deploy animation