Move objects in windows while game

Hi, I want to let users move objects, which are derived from class “AAA”, in game at runtime. The desired effects are like ones in scene windows in unity3d editor, owing moving Axis, rotation, scale.
It will allow users to control their own user interface after the function of controller is activated.

Is there a quick method to implement it? (Unity3d editor already has it :slight_smile: )

It’s pretty easy to implement, there’s no built in functionality, but you can use this approach:

  • Instantiate 3 meshes to act as the arrows/handles (make sure they have big enough box colliders to click on)

  • In your script, perform a raycast against the handles on mouse down

  • If the ray cast hits, for as long as the mouse button is held down, get the axis of mouse movement

  • If the user clicked on the Z axis arrow for instance, translate the transform along that axis by the mouse movement (possibly have your own filtering on this)

  • On mouse up, stop movement and wait for next mouse down