Bevy Cursor
Bevy Cursor is a bevy
plugin to track information about the cursor.
The following cursor information is available via the CursorInfo
resource:
- The entity id of the window on which the cursor is currently;
- The entity if of the camera on which the cursor is currently;
- The position of the cursor on the window (logical position);
- The 2D world position of the cursor (if the feature
2d
is enabled); - The ray emitted by the cursor through the camera (if the feature
3d
is enabled);
Example
use *;
use *;
Features
2d
opt-in the computation of the world position of the cursor.3d
opt-in the computation of the ray emitted by the cursor through the camera (disabled by default).
Bevy compatible version
bevy | bevy_cursor |
---|---|
0.12 | 0.2 |
0.11 | 0.1 |