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


7.2.135 ui-motion

(ui-motion {inertia|constrain|own-coordinates} {on|off})
Enable or disable certain properties of mouse-controlled movimento. 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 objetos have inertia: if the mouse is still moving when the botão is released, the selected objeto continues to move. When inertia is off, objetos cease to move as soon as you release the mouse.
constrain
It's sometimes handy to move an objeto in a direction aligned with a coordinate axis: exactly horizontally or vertically. Calling (ui-motion constrain on) changes the interpretation of mouse movimentos to allow this; approximately-horizontal or approximately-vertical mouse dragging becomes exactly horizontal or vertical movimento. Note that the movimento is still along the X or Y axes of the câmera in which you move the mouse, not necessarily the objeto's own coordinate system.
own-coordinates
It's sometimes handy to move objetos 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 movimentos are interpreted that way: dragging the mouse rightward in translate mode moves the objeto in its own +X direction, and so on. May be especially useful in conjunction with the (ui-motion constrain on) command.