Structs

A highlighting plugin, generic over any asset that might be used for rendering the different highlighting states.

Resource that defines the default highlighting assets to use. This can be overridden per-entity with the Highlighting component.

Component used to track the initial asset of a highlightable object, as well as for overriding the default highlight materials.

Tracks the current hover state to be used with change tracking in the events system.

Marker struct used to mark pickable entities for which you don’t want to trigger a deselection event when picked. This is useful for gizmos or other pickable UI entities.

Marker component for entities that, whenever their [Interaction] component is anything other than None, will suspend highlighting and selecting PickableMeshs. Bevy UI [Node]s have this behavior by default.

This unit struct is used to tag the generic ray casting types RayCastMesh and RayCastSource. This means that all Picking ray casts are of the same type. Consequently, any meshes or ray sources that are being used by the picking plugin can be used by other ray casting systems because they will have distinct types, e.g.: RayCastMesh<PickingRaycastSet> vs. RayCastMesh<MySuperCoolRaycastingType>, and as such wil not result in collisions.

The RayCastSource component is used to generate rays with the specified cast_method. A ray is generated when the RayCastSource is initialized, either by waiting for update_raycast system to process the ray, or by using a with_ray function.

Tracks the current selection state to be used with change tracking in the events system. Entities with Selection will have selection state managed.

Enums

An event that triggers when the hover state of a Hover enabled PickableMesh changes.

An event that wraps selection and hover events

An event that triggers when the selection state of a Selection enabled PickableMesh changes.

Traits

This trait makes it possible for highlighting to be generic over any type of asset.

Functions

Listens for HoverEvent and SelectionEvent events and prints them

Looks for changes in selection or hover state, and sends the appropriate events

Update Screenspace ray cast sources with the current mouse position

Type Definitions

A type alias for the concrete RayCastMesh type used for Picking.

A type alias for the concrete RayCastSource type used for Picking.