Quantcast
Channel: Babylon.js
Viewing all articles
Browse latest Browse all 388

Drag and drop without clicking

$
0
0

Hey guys, so im building a tycoon game were you can buy furniture and place it in your house. I have implemented the drag drop system from the playground (http://www.babylonjs-playground.com) and it works for objects which have been placed on the scene. 

 

My issue is is that I now want to click a button to BUY an object (mesh) and as soon as I mouse up from the button the mesh would follow my mouse (like the drag and drop) and stop after I click again to place the object. 

 

I have tried to expand the drag drop to allow this but in its current implementation it has to have a click/pick event on the mesh I want to move. 

 

Has any one expanded the drag drop to work with and without a click event or do I have to make a second set of functions to do this? 

Cheers for any help you can pass my way. 


Viewing all articles
Browse latest Browse all 388

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>