2024-02-26 22:13:45 +05:30
# Rotate node
Rotates value of input UV around a reference point defined by input < b > < i > center< / i > < / b > by the amount of input < b > < i > rotation< / i > < / b > .< br > < br > < i > Default value for uv input will be vec2(0, 0) for shader modes < i > PARTICLES< / i > , < i > SKY< / i > and < i > FOG< / i > to avoid errors becouse UV variable is not available for these modes.< / i >
< hr >
**Inputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|uv|vec2|UV|Input UV value|
|center|vec2|none|Center reference point|
2024-04-15 23:04:10 +05:30
|rotation|float|none|Rotation amount|
2024-02-26 22:13:45 +05:30
**Controls**
|Name|Options|Description|
|---|---|---|
|Units|Degrees, Radians|Specifies the unit for < i > < b > rotation< / b > < / i > input|
**Outputs**
|Name|Type|Binding|Description|
|---|---|---|---|
|uv|vec2|None|Output UV value|
2024-04-15 23:04:10 +05:30
**ShaderInc location**
2024-07-21 16:39:45 +05:30
< br > `res://addons/ShaderLib/UV/UV.gdshaderinc`
2024-04-15 23:04:10 +05:30
**Method signature**
< br > `vec2 rotate_uv(vec2 uv, vec2 center, float rotation, bool use_degrees)`
**Parameters**
|Name|Type|Description|
|---|---|---|
|uv|vec2|Input uv|
|center|vec2|Center reference point|
|rotation|float|Rotation amount|
|use_degrees|bool|Specifies the unit for rotation, true = Degrees, false = Radians|
2024-02-26 22:13:45 +05:30
___