Read Viewport Hover State (BETA)

Read the state of the last viewport hover event from 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 and velocity 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 hover events

Viewport

Outputs

Name

Type

Description

Default

Position (position)

double[2]

The current mouse position if the specified viewport is currently hovered, otherwise (0,0)

Velocity (velocity)

double[2]

A vector representing the change in position of the mouse since the previous frame if the specified viewport is currently hovered, otherwise (0,0)

Is Hovered (isHovered)

bool

True if the specified viewport is currently hovered

Is Valid (isValid)

bool

True if a valid event state was detected and the outputs of this node are valid, and false otherwise