Mathf.MoveTowardsAngle(number current, number target, number maxDelta)
Same as MoveTowards but makes sure the values interpolate correctly when they wrap around 360 degrees.
Parameters:
Name | Type | Description |
---|---|---|
current | number | current |
target | number | target |
maxDelta | number | maxDelta |
Returns:
type | Description |
---|---|
number | Moves value of current towards target. |
Usage
---@type number
local current;
---@type number
local target;
---@type number
local maxDelta;
local val0 = Mathf:MoveTowardsAngle(current, target, maxDelta)