Fix64 CalculateRadius()
        {
            Fix64 maxScale = Fix64Math.Max(colliderScale.x, colliderScale.y);
            Fix64 result   = maxScale * _radius;

            return(result);
        }
        Fix64 CalculateRadius()
        {
            Fix64 maxScale = Fix64Math.Max(pTransform.localScale.x, pTransform.localScale.y, pTransform.localScale.z);
            Fix64 result   = maxScale * _radius;

            return(result);
        }
Esempio n. 3
0
        //Angle in degrees between two normalized vectors
        public static Fix64 Anlge(Fix64Vec3 a, Fix64Vec3 b)
        {
            Fix64 dot     = Fix64Vec3.Dot(a.normalized, b.normalized);
            Fix64 clamped = Fix64Math.Clamp(dot, -Fix64.one, Fix64.one);
            Fix64 rad     = Fix64.FromRaw(NativeFixedMath.Acos64(clamped.Raw));

            return(rad * Fix64.RadToDegree);
        }
        Fix64 CalculateRadius()
        {
            Fix64 maxScale = Fix64.one;

            if (Direction == ParallelCapsuleDirection3D.XAxis)
            {
                maxScale = Fix64Math.Max(pTransform.localScale.y, pTransform.localScale.z);
            }
            else if (Direction == ParallelCapsuleDirection3D.YAxis)
            {
                maxScale = Fix64Math.Max(pTransform.localScale.x, pTransform.localScale.z);
            }
            else
            {
                maxScale = Fix64Math.Max(pTransform.localScale.x, pTransform.localScale.y);
            }

            return(maxScale * _radius);
        }