#[repr(C)]pub struct OnCollision {
pub entity: EntityHandle,
pub other: EntityHandle,
pub world_pos_approximate: [f32; 3],
pub force: f32,
}Expand description
Information about a collision between two entities.
Fields§
§entity: EntityHandle§other: EntityHandle§world_pos_approximate: [f32; 3]Approximately where the collision happened. Useful for effects and sounds, not game logic. Currently this is calculated as the average position of the two entities, so it is VERY approximate.
force: f32Placeholder for the collision force, not yet implemented.
Trait Implementations§
Source§impl Clone for OnCollision
impl Clone for OnCollision
Source§fn clone(&self) -> OnCollision
fn clone(&self) -> OnCollision
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OnCollision
impl Debug for OnCollision
impl Copy for OnCollision
impl Pod for OnCollision
Auto Trait Implementations§
impl Freeze for OnCollision
impl RefUnwindSafe for OnCollision
impl Send for OnCollision
impl Sync for OnCollision
impl Unpin for OnCollision
impl UnwindSafe for OnCollision
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.