JackFalcon Posted May 10, 2018 Share Posted May 10, 2018 This code converts a Screen Pick in World Space down to a Local Space on one side of a rotated cube, so that user can move objects around on each face of the cube... var invertParentWorldMatrix = northPlane.getWorldMatrix().clone(); invertParentWorldMatrix.invert(); var local_position = BABYLON.Vector3.TransformCoordinates(pickPointNext, invertParentWorldMatrix); pickObj.position.copyFrom(local_position); pickObj.position.addInPlace(moveVector); //MOVE-TO-POSITION-. Problem arises in optimizing the Cube. By making it small and scaling it up. The translation above didn't scale. The pick still moves, but at tiny-scale. So, the translation (above) needs to scale up to match the parent, northPlane. But it seems like the scaling is... lost in translation somehow? Any tips on how to scale up the transform above? Does it need baking? Thanks much, Looking around... : ) Quote Link to comment Share on other sites More sharing options...
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.