{"name":"setVelocity","title":"setVelocity","type":"command","url":"https://community.bistudio.com/wiki/setVelocity","revid":378408,"updated":"2026-04-04T08:14:56Z","groups":["Object Manipulation"],"status":"ok","games":{"ofp":"1.80","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.80","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Sets velocity vector of an object in m/s.\n\n> [!IMPORTANT]\n> Since Arma 3 v2.06 each velocity component is limited to the range +-5000 m/s.","syntaxes":[{"syntax":"object setVelocity vector","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"vector","type":"Vector3D","type_expr":"Vector3D"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"vector"}}],"examples":[{"code":["_truck1 setVelocity [20, 0, 0];"]},{"text":"Advanced method used for relative acceleration:\n\n```sqf\n_vel = velocity _vehicle;\n_dir = getDir _vehicle;\n_additionalSpeed = 10; // in m/s\n_vehicle setVelocity [\n    (_vel select 0) + (sin _dir * _additionalSpeed),\n    (_vel select 1) + (cos _dir * _additionalSpeed),\n    (_vel select 2) // horizontal only\n];\n```","code":["_vel = velocity _vehicle;\n_dir = getDir _vehicle;\n_additionalSpeed = 10; // in m/s\n_vehicle setVelocity [\n\t(_vel select 0) + (sin _dir * _additionalSpeed), \n\t(_vel select 1) + (cos _dir * _additionalSpeed), \n\t(_vel select 2) // horizontal only\n];"]}],"see_also":["velocity","velocityModelSpace","setVelocityModelSpace","setVelocityTransformation","speed"],"notes":[{"user":"ffur2007slx2_5","date":"2014-06-20T16:50:00Z","text":"Arma 3 v1.22 setVelocity will be affected by setDir and setVectorDirAndUp, so use it after them."}]}