Skip to content

Commit

Permalink
[+]Avian(Backend) - GravityScale::Default changed to 1.0f32 (#464)
Browse files Browse the repository at this point in the history
# Objective

Fixes #463 

## Solution

Default implemented with 1.0

---------

Co-authored-by: Joona Aalto <[email protected]>
  • Loading branch information
Khanoto and Jondolf committed Jul 24, 2024
1 parent 5ecfd5a commit fb99129
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/dynamics/rigid_body/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,14 +430,18 @@ pub(crate) struct PreSolveAngularVelocity(pub Vector);
/// ));
/// }
/// ```
#[derive(
Component, Reflect, Debug, Clone, Copy, PartialEq, PartialOrd, Default, Deref, DerefMut, From,
)]
#[derive(Component, Reflect, Debug, Clone, Copy, PartialEq, PartialOrd, Deref, DerefMut, From)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serialize", reflect(Serialize, Deserialize))]
#[reflect(Debug, Component, Default, PartialEq)]
pub struct GravityScale(pub Scalar);

impl Default for GravityScale {
fn default() -> Self {
Self(1.0)
}
}

/// Determines how coefficients are combined for [`Restitution`] and [`Friction`].
/// The default is `Average`.
///
Expand Down

0 comments on commit fb99129

Please sign in to comment.