pub struct ShapeCast {
pub shape: ColliderShape,
pub origin: [f32; 3],
pub euler_deg: [f32; 3],
pub motion: [f32; 3],
pub exclude: Option<BodyHandle>,
pub mask: LayerMask,
}Expand description
A shape swept through the world along a straight line.
The sweep is a translation: the shape keeps the orientation it starts with
for the whole of motion. That is what a character move is, and it is what
makes the time of impact exact rather than bounded.
Fields§
§shape: ColliderShapeWhat to sweep.
origin: [f32; 3]Where the shape’s centre starts, in world space.
euler_deg: [f32; 3]The shape’s orientation, held for the whole sweep.
motion: [f32; 3]The whole displacement to sweep along. A zero motion asks only whether the shape is already touching something.
exclude: Option<BodyHandle>A body to leave out, usually the sweeping character’s own.
mask: LayerMaskLayers the sweep interacts with.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ShapeCast
impl RefUnwindSafe for ShapeCast
impl Send for ShapeCast
impl Sync for ShapeCast
impl Unpin for ShapeCast
impl UnsafeUnpin for ShapeCast
impl UnwindSafe for ShapeCast
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