Convergence Posted May 21, 2017 Share Posted May 21, 2017 Likely a very simple question for the veterans Is it possible to convert a Vector3 given in world space coords to the local space of a mesh? Example: http://www.babylonjs-playground.com/#XMFZ0Z#3 JackFalcon 1 Quote Link to comment Share on other sites More sharing options...
Convergence Posted May 21, 2017 Author Share Posted May 21, 2017 Oh, I might have found the answer myself in the babylon code var invertParentWorldMatrix = parent.getWorldMatrix().clone(); invertParentWorldMatrix.invert(); var worldPosition = new BABYLON.Vector3(x, y, z); position = BABYLON.Vector3.TransformCoordinates(worldPosition, invertParentWorldMatrix); JackFalcon 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 29, 2017 Share Posted May 29, 2017 Correct JackFalcon 1 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.