Trait bevy_rapier2d::prelude::EventHandler[][src]

pub trait EventHandler: Send + Sync {
    fn handle_intersection_event(&self, event: IntersectionEvent);
fn handle_contact_event(
        &self,
        event: ContactEvent,
        contact_pair: &ContactPair
    ); }
Expand description

Trait implemented by structures responsible for handling events generated by the physics engine.

Implementors of this trait will typically collect these events for future processing.

Required methods

fn handle_intersection_event(&self, event: IntersectionEvent)[src]

Handle an intersection event.

A intersection event is emitted when the state of intersection between two colliders changes.

fn handle_contact_event(&self, event: ContactEvent, contact_pair: &ContactPair)[src]

Handle a contact event.

A contact event is emitted when two collider start or stop touching, independently from the number of contact points involved.

Implementations on Foreign Types

impl EventHandler for ()[src]

pub fn handle_intersection_event(&self, _event: IntersectionEvent)[src]

pub fn handle_contact_event(
    &self,
    _event: ContactEvent,
    _contact_pair: &ContactPair
)
[src]

Implementors