Bevy Picking
taintedcoders.com·12h·
🕹️Terminal Games
Preview
Report Post

Often a game feature will want to have a player interact with some kind of object in the world, usually through clicking, dragging and dropping. Or inside of the UI knowing when the mouse is hovering over a button and when it is clicked.

This behavior is often called picking and is generic enough that bevy provides a built-in plugin to handle it for you: bevy_picking.

Picking is built around the concept of a Pointer which is a abstract representation of user input at a specific screen location.

Pointers can exist on 3 things:

  1. Windows
  2. Images
  3. GPU Texture Views

Bevy’s DefaultPlugins includes the DefaultPickingPlugins if you have the bevy_picking feature enabled which contains:

PluginDescription
InteractionPluginGenerat…

Similar Posts

Loading similar posts...