I want to spawn a cube mesh, and then allow the user to pull on the corners or axis to resize and transform it and also to be able to move the entire cube around. Basically to replicate how manipulating mesh in the editor works, but during play mode.
Well you can probably go with using both the mouse buttons, one for each action, and then when dragging the mouse, depending on what button you’re pressing, you either move the cube or scale it.
If you want to do it in 3 axis instead of 2, that can get kinda complicated.
- Convert Mouse location to world space
- To do that create a new blueprint which will have this logic, say MouseAimer
- If it collides (many way to check if your mouse pointer is hiting it, say a raycast from your camera center to BP or from mosue position in the viewprot for start)
- Create a variable called CurrentlySelectedActor in the MouseAimer Blueprint
- Set the variable as the actor that is being selected by your mouse position (Step 1 for reference)
- Now assign some keyboard key presses to scale up or down etc or your mousewheel or something.