Axis-restricted dragging

7 views
Skip to first unread message

Will Monroe

unread,
Jul 26, 2011, 2:08:37 PM7/26/11
to Emerson
Hey Masters of Sirikata,

The systems I wrote for undo/redo and dragging along axes are in the
new build.  Here's what's new.

New key bindings:
  Ctrl-Z: undo
  Ctrl-Y: redo

  Alt-G: snap axes to selected presence's local coordinate frame
  Ctrl-G: snap axes to global coordinate frame
  Ctrl-R: switch between rotate and move mode
  Ctrl-0 (zero): rotate selected presence to default orientation
(facing along negative z axis)

Cool features:
  -infinite undo/redo
  -dragging an axis in move mode will only move the associated
presence along that axis
  -dragging a gimbal in rotate mode will only rotate in the plane of the gimbal
  -script requests (such as those sent by the setMesh UI)
accidentally sent to axes will be forwarded to the associated presence
[but don't push your luck]

Bug-turned-feature:
  -using Ctrl-0 when an axis is selected, rather than a presence,
will cause the axis to point straight up (thus, Ctrl-0-ing the green
axis will do the same thing as Ctrl-0-ing the presence itself, but
doing it to the other two axes allows you to snap to two other
possibly-useful orientations)

Annoyances:
  -you can't turn the axes off!  Alex pointed this out to me -- my
bad for following the Facebook model of user interface changes.  I've
already fixed this and I'll be sending the new version to Behram and
Ewen this afternoon.
  -rotate mode is unintuitive.  Here's how it works: hit Ctrl-R to
switch to the rotate gimbals.  Click one, hold (don't press Ctrl!) and
wiggle the mouse in various parts of the screen.  The gimbals rotate
according to the right hand rule; e.g. if your mouse is above a
horizontal gimbal, the side near the camera will rotate to the right.
The farther the mouse is from the object, the faster it rotates (but
only if you keep moving your mouse).
  -so many friggin' key bindings!  I've written a UI for the next
build so you can ditch Ctrl-Alt-Fu in favor of shiny buttons with
words on them.
  -rotate mode doesn't play well with undo.  Ctrl-0 alleviates this a
little bit, but not much.
  -undoing axis drags only works if you select the right presence; a
drag on another presence can be undone on the currently selected
presence, with unfortunate results.  (Usually you can Ctrl-Y, select
the right presence, and Ctrl-Z again.  I'm working on making selection
undoable and special-casing the axes to make this problem obsolete.)

Hopefully the positives still outweigh the negatives.  Happy dragging!

Will

Will Monroe

unread,
Jul 26, 2011, 3:08:16 PM7/26/11
to Emerson
Here is the new interface, if the axes are bothering you. default.em
is the only one that has a significant risk of conflicts, so make sure
you haven't made independent changes to key bindings, UIs, etc. before
overwriting.

default.em is share/js/scripts/std/graphics/default.em
axes.em is share/js/scripts/std/graphics/axes.em
dragControls.em is (new file) share/js/scripts/std/graphics/dragControls.em
dragControls.js is (new file) share/ogre/data/drag/dragControls.js

This will make the axes controllable via buttons rather than key
combos, and adds an "off" mode.

Will

dragControls.js
axes.em
default.em
dragControls.em

Will Monroe

unread,
Jul 26, 2011, 3:18:11 PM7/26/11
to Emerson
(Ctrl-D opens the drag controls window, by the way.)

On Tue, Jul 26, 2011 at 12:08 PM, Will Monroe <wmon...@stanford.edu> wrote:
> Here is the new interface, if the axes are bothering you.  default.em
> is the only one that has a significant risk of conflicts, so make sure
> you haven't made independent changes to key bindings, UIs, etc. before
> overwriting.
>
> default.em is share/js/scripts/std/graphics/default.em
> axes.em is share/js/scripts/std/graphics/axes.em
> dragControls.em is (new file) share/js/scripts/std/graphics/dragControls.em
> dragControls.js is (new file) share/ogre/data/drag/dragControls.js
>
> This will make the axes controllable via buttons rather than key
> combos, and adds an "off" mode.
>
> Will
>
>
> On Tue, Jul 26, 2011 at 11:08 AM, Will Monroe <wmon...@stanford.edu> wrote:

Reply all
Reply to author
Forward
0 new messages