---
name: "getLeaning"
type: command
status: ok
groups: ["Unit Control"]
arma3_since: "2.18"
locality: {"argument": "global", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/getLeaning
revid: 369757
updated: 2024-10-08T15:08:56Z
---

# getLeaning

*Command · Unit Control · Arma 3 v2.18*

Locality: arguments **global**

## Description

Returns the leaning factor of the given unit.

## Syntax

```sqf
getLeaning unit
```

**Parameters:**

- `unit`: [Object](../topics/Object.md)

**Returns:** [Number](../topics/Number.md) - leaning factor from -1 to 1

## Examples

### Example 1

```sqf
if (getLeaning player < 0) then { systemChat "player is leaning left" };
```

## See also

[animationState](../commands/animationState.md) · [unitPos](../commands/unitPos.md) · [stance](../commands/stance.md) · [pose](../commands/pose.md)

<sub>Source: [BI Community Wiki — getLeaning](https://community.bistudio.com/wiki/getLeaning) (revision 369757).</sub>
