Drag and Drop In Game
Hi All, I need a help, a tip or something that could lead me to a solution.
I´m developing a game that I need to drag objects with mouse and put them in some positions inside the map. I am facing a issue on imagining a way to do this. How can I drag the objects inside the maps (actors like cubes and others geometrics) with mouse?
Please, help me! Any tip is very wellcome.
Thank you so much!!!
There is a node called "Get hit result under mouse" in your Controller BP. You can use this to check after a click if the object you clicked on is one you can move and then save it in a variable.
You can then on each tick get that location the same way and move the object you picked up there (probably putting the object a bit above the ground with a little bit of vector modification) and then when you want to put it down again just empty your variable and place the actor on the actual location.
Remember for the event tick move to check with a branch if your variable contains anything (via "IsValid").
I hope this helps.
answered Jan 06 '15 at 01:37 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here