ffur2007slx2_5
Arma 3 v1.22 setVelocity will be affected by setDir and setVectorDirAndUp, so use it after them.
Results appear below as you type; use the arrow keys to move through them.
Command · Markdown · JSON · original wiki page
Sets velocity vector of an object in m/s.
Important
Since Arma 3 v2.06 each velocity component is limited to the range +-5000 m/s.
object setVelocity vector
Parameters:
Returns: Nothing
_truck1 setVelocity [20, 0, 0];
Advanced method used for relative acceleration:
_vel = velocity _vehicle;
_dir = getDir _vehicle;
_additionalSpeed = 10; // in m/s
_vehicle setVelocity [
(_vel select 0) + (sin _dir * _additionalSpeed),
(_vel select 1) + (cos _dir * _additionalSpeed),
(_vel select 2) // horizontal only
];
velocity · velocityModelSpace · setVelocityModelSpace · setVelocityTransformation · speed
Arma 3 v1.22 setVelocity will be affected by setDir and setVectorDirAndUp, so use it after them.