---
name: "ctrlSetAngle"
type: command
status: ok
groups: ["GUI Control"]
arma3_since: "1.62"
locality: {"argument": "local", "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/ctrlSetAngle
revid: 376965
updated: 2026-01-01T05:57:04Z
---

# ctrlSetAngle

*Command · GUI Control · Arma 3 v1.62*

Locality: arguments **local** · effect **local**

## Description

Sets the rotation of a control set as `ST_PICTURE`. Rotation will be done within the control boundaries, so if the X and Y are given off center, the picture may get clipped by the control boundaries.
Only requires [ctrlCommit](../commands/ctrlCommit.md) when fourth parameter is set to [false](../commands/false.md). Procedural textures filled controls do not rotate. Supported control types:
- CT_STATIC
- Arma 3 v2.10 CT_ACTIVETEXT

> [!IMPORTANT]
> Images that touch borders may "bleed" during rotation transformation, to avoid this, make sure the image has a 1px transparent padding.

## Syntax

```sqf
control ctrlSetAngle [angle, centerX, centerY, now]
```

**Parameters:**

- `control`: [Control](../topics/Control.md) - picture control
- `angle`: [Number](../topics/Number.md) - rotation angle (clockwise)
- `centerX`: [Number](../topics/Number.md) in range 0..1 - rotation center X. Control center is 0.5
- `centerY`: [Number](../topics/Number.md) in range 0..1 - rotation center Y. Control center is 0.5
- `now`: [Boolean](../topics/Boolean.md) - (Optional, default [true](../commands/true.md)) if [false](../commands/false.md), control will wait for [ctrlCommit](../commands/ctrlCommit.md) input for result to apply *(since arma3 1.78)*

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
_control ctrlSetAngle [25, 0.5, 0.5];
```

### Example 2

```sqf
with uiNamespace do
{
    ctrl = findDisplay 46 ctrlCreate ["RscPictureKeepAspect", -1];
    ctrl ctrlSetPosition [0,0,1,1];
    ctrl ctrlSetText "A3\Missions_F_Exp\data\Img\lobby\ui_campaign_lobby_background_tablet_radial_left_ca.paa";
    ctrl ctrlCommit 0;
    angle = 0;
    onEachFrame
    {
        with uiNamespace do
        {
            if (angle > 359) then { angle = 0 };
            ctrl ctrlSetAngle [angle, 0.5, 0.5];
            angle = angle + 1;
        };
    };
};
```

### Example 3

```sqf
_control ctrlSetAngle [25, 0.5, 0.5, false];
_control ctrlCommit 1; // Rotation applies smoothly for 1 second.
```

## See also

[ctrlAngle](../commands/ctrlAngle.md)

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