User Tools

Site Tools


dragengine:modules:dragonscript:behavior_actoranimated

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
dragengine:modules:dragonscript:behavior_actoranimated [2026/11/24 20:41] – [actorAnimated.set] dragonlorddragengine:modules:dragonscript:behavior_actoranimated [2026/11/24 20:44] (current) – [controllerMapping (behavior factor)] dragonlord
Line 43: Line 43:
  
 Sets the animator controller mappings. These mappings are assigned to [[behavior_locomotion|ECBehaviorLocomotion]] if present in the class. This allows to easily apply certain actor input parameters to animators using controllers of the matching names. This is a behavior factory only parameter (see section [[#behavior_factory|Behavior Factory]]). The value is a dictionary mapping animator controller names to locomotion attributes. These are the default mappings: Sets the animator controller mappings. These mappings are assigned to [[behavior_locomotion|ECBehaviorLocomotion]] if present in the class. This allows to easily apply certain actor input parameters to animators using controllers of the matching names. This is a behavior factory only parameter (see section [[#behavior_factory|Behavior Factory]]). The value is a dictionary mapping animator controller names to locomotion attributes. These are the default mappings:
-  * "idle": LocomotionAttribute.elapsedTime +  * ''idle'': LocomotionAttribute.elapsedTime 
-  * "look.vertical": LocomotionAttribute.lookVertical +  * ''look.vertical'': LocomotionAttribute.lookVertical 
-  * "look.horizontal": LocomotionAttribute.lookHorizontal +  * ''look.horizontal'': LocomotionAttribute.lookHorizontal 
-  * "turn.inPlace": LocomotionAttribute.timeTurnIP +  * ''turn.inPlace'': LocomotionAttribute.timeTurnIP 
-  * "turn.velocity": LocomotionAttribute.turningSpeed +  * ''turn.velocity'': LocomotionAttribute.turningSpeed 
-  * "stance": LocomotionAttribute.stance +  * ''stance'': LocomotionAttribute.stance 
-  * "move.walk": LocomotionAttribute.displacement +  * ''move.walk'': LocomotionAttribute.displacement 
-  * "move.run": LocomotionAttribute.displacement +  * ''move.run'': LocomotionAttribute.displacement 
-  * "move.velocity": LocomotionAttribute.relativeMovingSpeed +  * ''move.velocity'': LocomotionAttribute.relativeMovingSpeed 
-  * "move.speed": LocomotionAttribute.movingSpeed +  * ''move.speed'': LocomotionAttribute.movingSpeed 
-  * "move.direction": LocomotionAttribute.movingDirection +  * ''move.direction'': LocomotionAttribute.movingDirection 
-  * "tilt.vertical": LocomotionAttribute.tiltVertical +  * ''tilt.vertical'': LocomotionAttribute.tiltVertical 
-  * "tilt.horizontal": LocomotionAttribute.tiltHorizontal +  * ''tilt.horizontal'': LocomotionAttribute.tiltHorizontal 
-  * "tilt.offset": LocomotionAttribute.tiltOffset +  * ''tilt.offset'': LocomotionAttribute.tiltOffset 
-  * "interaction": LocomotionAttribute.elapsedTime+  * ''interaction'': LocomotionAttribute.elapsedTime
  
 Hence if you want an animator to react to the movement speed add a controller named ''move.velocity'' with the respective range. By changing the mapping you can use names appropriate for your animators. Keep in mind all animators used with this behavior have to use the same names. If you want to change the mappings mid-game you have to use script code or behavior tree actions to change the mapping whenever you change the animator. Hence if you want an animator to react to the movement speed add a controller named ''move.velocity'' with the respective range. By changing the mapping you can use names appropriate for your animators. Keep in mind all animators used with this behavior have to use the same names. If you want to change the mappings mid-game you have to use script code or behavior tree actions to change the mapping whenever you change the animator.
 +
 +The following values can be used for ''LocomotionAttribute'':
 +  * ''elapsedTime'': Elapsed time modified by play speed
 +  * ''lookVertical'': Look up and down
 +  * ''lookHorizontal'': Look left and right
 +  * ''movingSpeed'': Moving velocity in meters per second
 +  * ''movingDirection'': Moving direction relative to the view direction
 +  * ''relativeMovingSpeed'': Relative moving speed. Similar to ''movingSpeed'' but negated if absolute ''movingDirection'' is larger than 90 degrees
 +  * ''turningSpeed'': Turning velocity in degrees per second
 +  * ''stance'': Stance
 +  * ''displacement'': Displacement in meters
 +  * ''timeTurnIP'': Playback time turn-inplace
 +  * ''tiltOffset'': Tilt offset
 +  * ''tiltVertical'': Tilt up and down
 +  * ''tiltHorizontal'': Tilt right and left
 +  * ''relativeDisplacement'': Relative displacement in meters. Similar to ''displacement'' but negated if absolute ''movingDirection''
 +
 ====== Events ====== ====== Events ======
  
dragengine/modules/dragonscript/behavior_actoranimated.txt · Last modified: by dragonlord