pub struct Hit {
pub t: f32,
pub normal: Vec2,
}Expand description
A swept contact: when along the motion it happens, and which face was hit.
Fields§
§t: f32Fraction of the swept delta traveled before contact, in [0, 1].
0 means already touching along the entering axis; 1 means contact
exactly at the end of the motion.
normal: Vec2Axis-aligned unit normal of the surface struck, pointing from that surface toward the body.
Trait Implementations§
impl Copy for Hit
impl StructuralPartialEq for Hit
Auto Trait Implementations§
impl Freeze for Hit
impl RefUnwindSafe for Hit
impl Send for Hit
impl Sync for Hit
impl Unpin for Hit
impl UnsafeUnpin for Hit
impl UnwindSafe for Hit
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