max123 Posted October 10, 2017 Share Posted October 10, 2017 Hey guys, Is it possible to drag-drop sprites? The scene.pickSprite doesn't return a pickedPoint. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 10, 2017 Share Posted October 10, 2017 You will have to manually do it but once you know which sprite is picked it won't be different from regular drag'n'drop Quote Link to comment Share on other sites More sharing options...
max123 Posted October 11, 2017 Author Share Posted October 11, 2017 Thanks @Deltakosh, got the basics sorted. I'm having another issue though: I need to move things on X and Z axis only. However, the result is flaky at best. Is there a way to get this work reliably? Playground:https://www.babylonjs-playground.com/#XZJQIK Lines 56 and 57. The ground moves as expected, but the Plane object is not. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 11, 2017 Share Posted October 11, 2017 You should be able to do exactly like in this code: https://www.babylonjs-playground.com/?18 Quote Link to comment Share on other sites More sharing options...
max123 Posted October 12, 2017 Author Share Posted October 12, 2017 This approach fails when you rotate the camera so it's facing the scene at 90deg. However, I found a solution: just rotate your mesh on X axis slightly:https://www.babylonjs-playground.com/#XZJQIK#1 GameMonetize 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.