How to use the mouse to scale a cube in play mode?

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.

  1. Convert Mouse location to world space
  2. To do that create a new blueprint which will have this logic, say MouseAimer
  3. 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)
  4. Create a variable called CurrentlySelectedActor in the MouseAimer Blueprint
  5. Set the variable as the actor that is being selected by your mouse position (Step 1 for reference)
  6. Now assign some keyboard key presses to scale up or down etc or your mousewheel or something.