API reference
API reference
Select your platform
No SDKs available
No versions available

clampYAngle Function

Modifiers: final
Clamp the Y angle of a vector to a given range. This function ensures that the Y angle of the vector is within the specified range, while maintaining the length and XZ components

Signature

fun clampYAngle(vector: Vector3, minAngleDegrees: Float, maxAngleDegrees: Float): Vector3

Parameters

vector: Vector3
minAngleDegrees: Float
maxAngleDegrees: Float

Returns

Did you find this page helpful?