Description
Returns various information about the unit moves (primary animation) and gestures (masked animation)
Note
Up until Arma 3 v2.20 this command only worked for a man unit, and other units such as animals couldn't use this command. As of Arma 3 v2.22 animals are supported as well.
Syntax
Syntax 1
getUnitMovesInfo unit
Parameters:
unit: Object
Returns: Array format:
- 0 - moveProgress: Number - move progress in range 0-1
- 1 - moveTime: Number - move elapsed time (
move progress * move duration) - 2 - moveDuration: Number - move duration in seconds
- 3 - moveFactor: Number - move blend factor
- 4 - rtmStep: Vector3D - rtm step (how many meters the unit will move after finishing the animation)
- 5 - gestureProgress: Number - gesture progress in range 0-1
- 6 - gestureTime: Number - gesture elapsed time (
gesture progress * gesture duration) - 7 - gestureDuration: Number - gesture duration in seconds
- 8 - gestureFactor: Number - gesture blend factor
Syntax 2
unit getUnitMovesInfo index
Parameters:
Returns: Anything - Value of the requested property, or Nothing if index is invalid. See the main syntax.
Examples
Example 1
// Getting the move velocity of the animation
private _animInfo = getUnitMovesInfo player;
// velocity = displacement / time
private _animVelocity = _animInfo # 4 vectorMultiply -1 / _animInfo # 2; // -1 is because man model is reversed
// so the rtm animation moves "backwards"
Example 2
getUnitMovesInfo player params [
"_moveProgress",
"_moveTime",
"_moveDuration",
"_moveFactor",
"_rtmStep",
"_gestureProgress",
"_gestureTime",
"_gestureDuration",
"_gestureFactor"
];
See also
switchMove · switchGesture · moveTime · gestureState · animationState