var quat:Quaternion = new Quaternion(); quat.fromAxisAngle(new Vector3D(0, 1, 0), rot * MathConsts.DEGREES_TO_RADIANS); var mat:Matrix3D = new Matrix3D(); mat.position = new Vector3D(10, 0, 0); mat.append(quat.toMatrix3D()); plane.position = mat.position;
This is good and all but now I want to abstract it out into a function that takes in an axis vector, an angle, and a distance. It doesn't seem like the same code above would work if the axis were not the Y due to the position being hard-coded to (distance, 0, 0). I guess at this point I'm just looking for what that vector should be? The magnitude should always be the distance but does it matter what value I start it at?