public GodotVector3 Intersect3(GodotPlane b, GodotPlane c)
        {
            float s = normal.Cross(b.normal).Dot(c.normal);

            if (GodotMathf.Abs(s) <= 9.99999997475243E-07)
            {
                return(new GodotVector3());
            }
            return(((b.normal.Cross(c.normal) * d) + (c.normal.Cross(normal) * b.d) + (normal.Cross(b.normal) * c.d)) / s);
        }
Exemple #2
0
        public void SetLookAt(GodotVector3 eye, GodotVector3 target, GodotVector3 up)
        {
            GodotVector3 vector3_1 = eye - target;

            vector3_1.Normalize();
            GodotVector3 vector3_2 = up.Cross(vector3_1);
            GodotVector3 yAxis     = vector3_1.Cross(vector3_2);

            vector3_2.Normalize();
            yAxis.Normalize();
            basis  = GodotBasis.CreateFromAxes(vector3_2, yAxis, vector3_1);
            origin = eye;
        }