Crate bevy_mod_picking
source · [−]Structs
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.
A default highlightable button material implementation of the [IsPickableButton
] trait that
uses bevy’s [StandardMaterial
] for highlighting meshes. You may want to implement your own
component if the pickable object being rendered is not a mesh, or doesn’t use the
StandardMaterial
component for rendered appearance.
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. Meshes 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
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.