s&
About
The Project
info
About s&box
map
Roadmap
monitoring
Metrics
Engine startup and usage numbers
Updates
newspaper
Latest News
published_with_changes
Changes
Release-by-release changelog
Games
Browse Games
Discover Games
gamejams
Game Jam III
Starts
Fri 4 Sep
Theme
Theme revealed when the jam starts.
£
50,000
prizepool
Read more
Workshop
Playable
sports_esports
Games
Standalone games and gamemodes
Assets
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
apps
Everything
Every asset type in one list
Forum
Learn
Documentation
rocket_launch
Getting Started
docs
Documentation
api
API Reference
Resources
school
Tutorials
manage_search
Code Search
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Components
CitizenAnimationHelper
chevron_left
Components
class
CitizenAnimationHelper
Constructors
functions
CitizenAnimationHelper
Properties
data_object
AimAngle
data_object
AimBodyWeight
data_object
AimEyesWeight
data_object
AimHeadWeight
data_object
BodyWeight
data_object
DuckLevel
data_object
EyeSource
data_object
EyesWeight
data_object
EyeWorldTransform
remove_circle
FootShuffle
data_object
Handedness
data_object
HeadWeight
data_object
Height
data_object
HoldType
data_object
IkLeftFoot
data_object
IkLeftHand
data_object
IkRightFoot
data_object
IkRightHand
data_object
IsClimbing
data_object
IsGrounded
data_object
IsNoclipping
data_object
IsSitting
data_object
IsSwimming
data_object
IsWeaponLowered
data_object
LookAt
data_object
LookAtEnabled
data_object
LookAtEyes
data_object
MoveRotationSpeed
data_object
MoveStyle
data_object
Sitting
data_object
SittingOffsetHeight
data_object
SpecialMove
data_object
Target
data_object
VoiceLevel
Methods
functions
ProceduralHitReaction
functions
TriggerDeploy
functions
TriggerJump
functions
WithLook
functions
WithVelocity
functions
WithWishVelocity
CitizenAnimationHelper
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.
class
Sandbox.Citizen
.
account_tree
extends
Component
sealed
Sandbox.Engine
build
Constructors
1
CitizenAnimationHelper
(
)
data_object
Properties
34
AimAngle
Rotation
Where are we aiming?
AimBodyWeight
float
The weight of the aim angle, but specifically for the Citizen's body.
AimEyesWeight
float
The weight of the aim angle, but specifically for the Citizen's eyes.
AimHeadWeight
float
The weight of the aim angle, but specifically for the Citizen's head.
BodyWeight
float
DuckLevel
float
The scale of being ducked (crouched) (0 - 1)
EyeSource
GameObject
Where are the eyes of our character?
EyesWeight
float
EyeWorldTransform
Transform
The transform of the eyes, in world space. This is worked out from EyeSource is it's set.
FootShuffle
obsolete
float
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.
HeadWeight
float
Height
Nullable`1
How tall are we?
HoldType
HoldTypes
What kind of weapon are we holding?
IkLeftFoot
GameObject
IkLeftHand
GameObject
IK will try to place the limb where this GameObject is in the world.
IkRightFoot
GameObject
IkRightHand
GameObject
IsClimbing
bool
Are we climbing?
IsGrounded
bool
Are we on the ground?
IsNoclipping
bool
Are we noclipping?
IsSitting
bool
Are we sitting down?
IsSwimming
bool
Are we swimming?
IsWeaponLowered
bool
Is the weapon lowered? By default, this'll happen when the character hasn't been shooting for a while.
LookAt
GameObject
Which GameObject should the head/body rotate towards? Eyes will also use this unless a separate eye target is set.
LookAtEnabled
bool
Are we looking at something? Useful for stuff like cutscenes, where you want an NPC to stare at you.
LookAtEyes
GameObject
Optional separate target for eye direction. If not set, the eyes will follow the main Look At target.
MoveRotationSpeed
float
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.
MoveStyle
MoveStyles
We can force the model to walk or run, or let it decide based on the speed.
Sitting
SittingStyle
How are we sitting down?
SittingOffsetHeight
float
How far up are we sitting down from the floor?
SpecialMove
SpecialMoveStyle
We can force the model to have a specific movement state, instead of just running around. Sandbox.Citizen.CitizenAnimationHelper.SpecialMoveStyle.LedgeGrab is good for shimmying across a ledge. Sandbox.Citizen.CitizenAnimationHelper.SpecialMoveStyle.Roll is good for a platformer game where the character is rolling around continuously. Sandbox.Citizen.CitizenAnimationHelper.SpecialMoveStyle.Slide is good for a shooter game or a platformer where the character is sliding.
Target
SkinnedModelRenderer
The skinned model renderer that we'll apply all parameters to.
VoiceLevel
float
How loud are we talking?
functions
Methods
6
ProceduralHitReaction
(
info
,
damageScale
,
force
)
TriggerDeploy
(
)
Triggers a weapon deploy animation
TriggerJump
(
)
Triggers a jump animation
WithLook
(
lookDirection
,
eyesWeight
,
headWeight
,
bodyWeight
)
Have the player look at this point in the world
WithVelocity
(
Velocity
)
Have the player animate moving with a set velocity (this doesn't move them! Your character controller is responsible for that)
WithWishVelocity
(
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.
Inheritance
Component
CitizenAnimationHelper
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.