Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

mathf.clamp unity

//stops "value" from getting smaller than xMin and bigger than xMax.
float value = Mathf.Clamp(value, min, max);
 
PREVIOUS NEXT
Tagged: #unity
ADD COMMENT
Topic
Name
4+9 =