Next: ui-panel, Previous: ui-html-browser, Up: GCL Reference

#### 7.2.148 ui-motion

`(ui-motion {inertia|constrain|own-coordinates} {on|off})`
  Enable or disable certain properties of mouse-controlled motion. The purpose of this command is to give access to the respective toggles of the Main panel's Motion menu through GCL commands. See Mouse Motions.
  `inertia`
    Normally, moving objects have inertia: if the mouse is still moving when the button is released, the selected object continues to move. When `inertia` is off, objects cease to move as soon as you release the mouse.
  `constrain`
    It's sometimes handy to move an object in a direction aligned with a coordinate axis: exactly horizontally or vertically. Calling `(ui-motion constrain on)` changes the interpretation of mouse motions to allow this; approximately-horizontal or approximately-vertical mouse dragging becomes exactly horizontal or vertical motion. Note that the motion is still along the X or Y axes of the camera in which you move the mouse, not necessarily the object's own coordinate system.
  `own-coordinates`
    It's sometimes handy to move objects with respect to the coordinate system where they were defined, rather than with respect to some camera's view. When `(ui-motion own-coordinates on)` has been called, all motions are interpreted that way: dragging the mouse rightward in translate mode moves the object in its own +X direction, and so on. May be especially useful in conjunction with the `(ui-motion constrain on)` command.