Class EntityBehaviorGait
- Namespace
- Vintagestory.GameContent
- Assembly
- VSEssentials.dll
Defines gaits and movement for an entity Open in GitHub
[DocumentAsJson]
public class EntityBehaviorGait : EntityBehavior
- Inheritance
-
EntityBehaviorGait
Examples
"behaviors": [
{
"code": "gait",
"navigateUsingGaits": true,
"idleGaits": { "Land": "idle", "Sea": "swimidle" },
"gaits": [
"walkback": {
"movespeed": 0.011,
"backwards": true,
// "trot" sound needs to be defined in the "sounds" section of the entity file
"soundCode": "trot",
"animation": "walkback",
"animationSpeed": 2.55
},
"idle": {
"animation": "idle",
},
"walk": {
"movespeed": 0.019,
"soundCode": "trot",
"animation": "walk",
"animationSpeed": 1.8
},
"gallop": {
"movespeed": 0.1067,
"fallbackGaitCode": "walk",
"soundCode": "gallop",
"animation": "Run",
"weight": 10,
"animationSpeed": 1.2,
"blendMode": "Average",
"easeOutSpeed": 30
},
"swimforth": {
"movespeed": 0.015,
"fallbackGaitCode": "swimidle",
"environment": "Sea",
"animation": "Swim",
"animationSpeed": 1
},
"swimidle": {
"movespeed": 0.0,
"environment": "Sea",
"animation": "Swim",
"animationSpeed": 1
},
"swimback": {
"movespeed": 0.008,
"backwards": true,
"fallbackGaitCode": "swimidle",
"environment": "Sea",
"animation": "Swim",
"animationSpeed": 1
}
]
}
]
Fields
Gaits (Required) (Default: Empty)
All available gaits.
[DocumentAsJson("Required", "Empty", false)]
public FastSmallDictionary<string, GaitMeta> Gaits { get; private set; }
Field Value
IdleGaits (Required) (Default: Empty)
Per environment, the gait to use when standing still, treading water, hovering, or otherwise not doing anything in particular. Provided from json as gait codes.
[DocumentAsJson("Required", "Empty", false)]
public FastSmallDictionary<EnumHabitat, GaitMeta> IdleGaits { get; private set; }
Field Value
- FastSmallDictionary<EnumHabitat, GaitMeta>
NavigateUsingGaits (Optional) (Default: false)
[DocumentAsJson("Optional", "false", false)]
public bool NavigateUsingGaits