Esempio n. 1
0
        public static bool AlmostTheSame(this Transform t, Vector3 pos, Quaternion rot, Vector3 scale, float offset, bool ignorePos = false, bool ignoreRot = false, bool ignoreScale = false)
        {
            bool result = true;

            if (!ignorePos)
            {
                result = pos.AlmostTheSameVector3(t.position, offset);
            }
            if (!ignoreRot)
            {
                result = result && rot.AlmostTheSameAngle(t.rotation, offset);
            }
            if (!ignoreScale)
            {
                result = result && scale.AlmostTheSameVector3(t.localScale, offset);
            }
            return(result);
        }