chore: misc typo fixes

This commit is contained in:
Sébastien Crozet
2024-05-05 14:51:48 +02:00
committed by Sébastien Crozet
parent d0866d4232
commit 425b2fc83d
3 changed files with 16 additions and 12 deletions

View File

@@ -145,7 +145,7 @@ pub struct KinematicCharacterController {
/// Increase this number if your character appears to get stuck when sliding against surfaces. /// Increase this number if your character appears to get stuck when sliding against surfaces.
/// ///
/// This is a small distance applied to the movement toward the contact normals of shapes hit /// This is a small distance applied to the movement toward the contact normals of shapes hit
/// by the character controller. This helps shape-casting not getting stuck in an alway-penetrating /// by the character controller. This helps shape-casting not getting stuck in an always-penetrating
/// state during the sliding calculation. /// state during the sliding calculation.
/// ///
/// This value should remain fairly small since it can introduce artificial "bumps" when sliding /// This value should remain fairly small since it can introduce artificial "bumps" when sliding

View File

@@ -49,12 +49,12 @@ pub struct IntegrationParameters {
/// (default `1.0`). /// (default `1.0`).
pub warmstart_coefficient: Real, pub warmstart_coefficient: Real,
/// The approximate size of most dynamic objects in the scale. /// The approximate size of most dynamic objects in the scene.
/// ///
/// This value is used internally to estimate some length-based tolerance. In particular, the /// This value is used internally to estimate some length-based tolerance. In particular, the
/// values [`IntegrationParametres::allowed_linear_error`], /// values [`IntegrationParameters::allowed_linear_error`],
/// [`IntegrationParametres::max_penetration_correction`], /// [`IntegrationParameters::max_penetration_correction`],
/// [`IntegrationParametres::prediction_distance`], [`RigidBodyActivation::linear_threshold`] /// [`IntegrationParameters::prediction_distance`], [`RigidBodyActivation::linear_threshold`]
/// are scaled by this value implicitly. /// are scaled by this value implicitly.
/// ///
/// This value can be understood as the number of units-per-meter in your physical world compared /// This value can be understood as the number of units-per-meter in your physical world compared

View File

@@ -158,12 +158,16 @@ impl Collider {
self.flags.active_collision_types = active_collision_types; self.flags.active_collision_types = active_collision_types;
} }
/// The collision skin of this collider. /// The contact skin of this collider.
///
/// See the documentation of [`ColliderBuilder::contact_skin`] for details.
pub fn contact_skin(&self) -> Real { pub fn contact_skin(&self) -> Real {
self.contact_skin self.contact_skin
} }
/// Sets the collision skin of this collider. /// Sets the contact skin of this collider.
///
/// See the documentation of [`ColliderBuilder::contact_skin`] for details.
pub fn set_contact_skin(&mut self, skin_thickness: Real) { pub fn set_contact_skin(&mut self, skin_thickness: Real) {
self.contact_skin = skin_thickness; self.contact_skin = skin_thickness;
} }
@@ -451,7 +455,7 @@ impl Collider {
/// Compute the axis-aligned bounding box of this collider. /// Compute the axis-aligned bounding box of this collider.
/// ///
/// This AABB doesnt take into account the colliders collision skin. /// This AABB doesnt take into account the colliders contact skin.
/// [`Collider::contact_skin`]. /// [`Collider::contact_skin`].
pub fn compute_aabb(&self) -> Aabb { pub fn compute_aabb(&self) -> Aabb {
self.shape.compute_aabb(&self.pos) self.shape.compute_aabb(&self.pos)
@@ -519,7 +523,7 @@ pub struct ColliderBuilder {
pub enabled: bool, pub enabled: bool,
/// The total force magnitude beyond which a contact force event can be emitted. /// The total force magnitude beyond which a contact force event can be emitted.
pub contact_force_event_threshold: Real, pub contact_force_event_threshold: Real,
/// An extract thickness around the collider shape to keep them further apart when in collision. /// An extra thickness around the collider shape to keep them further apart when colliding.
pub contact_skin: Real, pub contact_skin: Real,
} }
@@ -973,12 +977,12 @@ impl ColliderBuilder {
self self
} }
/// Sets the collision skin of the collider. /// Sets the contact skin of the collider.
/// ///
/// The collision skin acts as if the collider was enlarged with a skin of width `skin_thickness` /// The contact skin acts as if the collider was enlarged with a skin of width `skin_thickness`
/// around it, keeping objects further apart when colliding. /// around it, keeping objects further apart when colliding.
/// ///
/// A non-zero collision skin can increase performance, and in some cases, stability. However /// A non-zero contact skin can increase performance, and in some cases, stability. However
/// it creates a small gap between colliding object (equal to the sum of their skin). If the /// it creates a small gap between colliding object (equal to the sum of their skin). If the
/// skin is sufficiently small, this might not be visually significant or can be hidden by the /// skin is sufficiently small, this might not be visually significant or can be hidden by the
/// rendering assets. /// rendering assets.