pub struct PropCollider {
pub shape: String,
pub half_extents: [f32; 3],
pub radius: f32,
pub half_height: f32,
pub layer: String,
}Expand description
Collision volume attached to a Prop.
The shape dimensions are in the prop’s local space and are scaled by the
prop’s scale. ball and capsule use the X scale component (they assume
uniform scaling).
Fields§
§shape: StringCollision shape: “aabb” (alias “cuboid”), “ball”, or “capsule”.
half_extents: [f32; 3]Box half-extents in local space [x, y, z]. Used by cuboid shapes.
radius: f32Radius in local space. Used by ball and capsule shapes.
half_height: f32Half the cylinder height in local space. Used by capsule shapes.
layer: StringCollision layer name. Built-in layers are world, prop, character,
and trigger; extra names come from PhysicsConfig
layers. Empty derives the layer from the body kind: world for a
static prop, prop when a PropBody makes it dynamic.
Trait Implementations§
Source§impl Clone for PropCollider
impl Clone for PropCollider
Source§fn clone(&self) -> PropCollider
fn clone(&self) -> PropCollider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PropCollider
impl Debug for PropCollider
Source§impl Default for PropCollider
impl Default for PropCollider
Source§impl<'de> Deserialize<'de> for PropColliderwhere
PropCollider: Default,
impl<'de> Deserialize<'de> for PropColliderwhere
PropCollider: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PropCollider
impl RefUnwindSafe for PropCollider
impl Send for PropCollider
impl Sync for PropCollider
impl Unpin for PropCollider
impl UnsafeUnpin for PropCollider
impl UnwindSafe for PropCollider
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