Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity normalize float


public static class VectorX {
    public static Vector3 SquareNormalize (this Vector3 vector) {
        var bounds = new Bounds(Vector3.zero, Vector3.one * 2f);
        return bounds.ClosestPoint(vector);
    }
}

Source by w3programmers.org #
 
PREVIOUS NEXT
Tagged: #unity #normalize #float
ADD COMMENT
Topic
Name
9+5 =