RelativeCursorPosition

RelativeCursorPosition

  • normalized_visible_node_rect : bevy_math::rects::rect::Rect
  • normalized : core::option::Optionglam::Vec2

Description

A component storing the position of the mouse relative to the node, (0., 0.) being the top-left corner and (1., 1.) being the bottom-right If the mouse is not over the node, the value will go beyond the range of (0., 0.) to (1., 1.)

It can be used alongside [Interaction] to get the position of the press.

The component is updated when it is in the same entity with Node.

Functions