michalstepien Posted August 6, 2018 Share Posted August 6, 2018 Hi, first - great job and great framework :) I have trouble to understand universal camera and pointer drag behaviour. If I move mesh few time It will be change position z. I would expect only x,y. How to prevent this? http://www.babylonjs-playground.com/#12WBC#212 Quote Link to comment Share on other sites More sharing options...
Guest Posted August 6, 2018 Share Posted August 6, 2018 Hello and welcome! by default the PointerDragBehavior will drag the mesh on the XY plane of the camera not the one of the scene (http://doc.babylonjs.com/how_to/meshbehavior#pointerdragbehavior) but you can define your own plane with: var pointerDragBehavior = new BABYLON.PointerDragBehavior({dragAxis: new BABYLON.Vector3(0,1,0)}); 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.