pub struct Body {
pub position: Vec2,
pub velocity: Vec2,
pub status: BodyStatus,
pub self_collide: bool,
/* private fields */
}Expand description
Describes a body.
It functions as a container for colliders.
Fields§
§position: Vec2§velocity: Vec2static body CAN have velocity - it just behaves as if it had infinite mass
(this might change with introduction of kinematic body that pushes other objects)
and doesn’t collide with other static bodies
status: BodyStatusType of body - static or kinematic
self_collide: boolWhether colliders of the same body should collide
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Body
impl RefUnwindSafe for Body
impl Send for Body
impl Sync for Body
impl Unpin for Body
impl UnwindSafe for Body
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