You can not divide a floating point value by a vector:
Plane.RotationY = Plane.RotationX / Plane.Position;
You can get the length of a vector with the length( v ) function, which returns a floating point:
// The RotationY is calculated by RotationX and the distance of PlaneA and PlaneB: // Note that we will divide by zero if PlaneA.Position == PlaneB.Position !!! Plane.RotationY = Plane.RotationX / length( PlaneA.Position - PlaneB.Position );
// The RotationY is calculated by RotationX and the distance of PlaneA and PlaneB:
// Note that we will divide by zero if PlaneA.Position == PlaneB.Position !!!
Plane.RotationY = Plane.RotationX / length( PlaneA.Position - PlaneB.Position );
Xpressionist 3