Implement Move Tool in-game as in Editor

I would like to implement the move tool just like it is in the editor.


How can I go about in achieving it?


Hey there, you can create an actor with 6 static meshes (x, y, z, xy, xz, yz arrows) with mouse on click event. Then you need an enum variable with all of the options to specify the current drag mode (none, x, y, z, xy, xz, yz) and 3 float variables to store the deltas for each axis. When you detect a mouse click event for each static mesh you set the corresponding drag mode, then on tick for each drag mode you apply the delta movement of the corresponding 1/2 axis to the parent actor you are attached (the object you want to move).

I did a bit of the implementation and somethings i said can be improved, instead of having an enum you can have multiplying vector, like X is (1,0,0) XY is (1,1,0) and then you multiply that vector with your input to filter it out. I got it to work easily except the relative mouse movement orientation, i think that is the hardest part. My guess is that you have to use the dot product to see where you are facing and where the arrow is.

Thanks, I’ll try to implement and see if it works out.

Hi,Have you implemented it?I also try to implement it