On Viewport Dragged (BETA)

Event node which fires when a viewport drag event occurs in the specified viewport. Note that viewport mouse events must be enabled on the specified viewport using a SetViewportMode node.

Installation

To use this Node, you must enable omni.graph.ui_nodes in the Extension Manager.

Inputs

Name

Type

Description

Default

Use Normalized Coords (useNormalizedCoords)

bool

When true, the components of 2D position outputs are scaled to between 0 and 1, where 0 is top/left and 1 is bottom/right. When false, components are in viewport render resolution pixels.

False

Viewport (viewport)

token

Name of the viewport window to watch for drag events

Viewport

Gesture (gesture)

token

The input gesture to trigger viewport drag events

Left Mouse Drag

Only Simulate On Play (onlyPlayback)

bool

When true, the node is only computed while Stage is being played

True

Outputs

Name

Type

Description

Default

Began (began)

execution

Enabled when the drag begins, populating ‘Initial Position’ with the current mouse position

Ended (ended)

execution

Enabled when the drag ends, populating ‘Final Position’ with the current mouse position

Initial Position (initialPosition)

double[2]

The mouse position at which the drag began (valid when either ‘Began’ or ‘Ended’ is enabled)

Final Position (finalPosition)

double[2]

The mouse position at which the drag ended (valid when ‘Ended’ is enabled)