Gheatza Posted February 24, 2014 Share Posted February 24, 2014 Hi, I am new to babylon, and after a few days of struggling with rotations, I really need your help. Basically I need to rotate an aircraft in 3D space.In babylon I tried myMesh.rotation = new BABYLON.Vector3(rotationX, rotationY,rotationZ) but this rotates the aircraft around global axis and it is not what I want. What I need is to rotate the aircraft around global Y axis, then rotate around local X and Z axis.This is the Actionscript code I have used in a similar game: matrix3D.identity(); matrix3D.appendRotation(currYaw, Vector3D.Y_AXIS); //Get the new local Z and X vectorsmatrix3D.copyColumnTo(2, fwdVec);matrix3D.copyColumnTo(0, rightVec); //Rotate around local Z and X axismatrix3D.appendRotation(currRoll, fwdVec);matrix3D.appendRotation(currPitch, rightVec); I was not able to find the babylon APIs that I could use to get the same results. I find a lot of posts on babylon that use APIs that are not present in the latest babylon version.Could someone please help me?Thank you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.