{"name":"getLeaning","operator":null,"title":"getLeaning","type":"command","url":"https://community.bistudio.com/wiki/getLeaning","revid":369757,"updated":"2024-10-08T15:08:56Z","groups":["Unit Control"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.18"}],"since":{"game":"arma3","name":"Arma 3","version":"2.18"},"arma3_since":"2.18","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Returns the leaning factor of the given unit.","syntaxes":[{"syntax":"getLeaning unit","since":null,"effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unit: Object"}],"returns":{"type":"Number","types":["Number"],"description":"leaning factor from -1 to 1","text":"Number - leaning factor from -1 to 1"},"form":"unary","operator":null,"left":null,"right":{"text":"unit","types":["Object"]}}],"examples":[{"text":"```sqf\nif (getLeaning player < 0) then { systemChat \"player is leaning left\" };\n```","code":["if (getLeaning player < 0) then { systemChat \"player is leaning left\" };"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["animationState","unitPos","stance","pose"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Unit Control","Introduced with Arma 3 version 2.18","Scripting Commands"]}