Skip to content

Commit fb99129

Browse files
KhanotoJondolf
andauthored
[+]Avian(Backend) - GravityScale::Default changed to 1.0f32 (#464)
# Objective Fixes #463 ## Solution Default implemented with 1.0 --------- Co-authored-by: Joona Aalto <jondolf.dev@gmail.com>
1 parent 5ecfd5a commit fb99129

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/dynamics/rigid_body/mod.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,14 +430,18 @@ pub(crate) struct PreSolveAngularVelocity(pub Vector);
430430
/// ));
431431
/// }
432432
/// ```
433-
#[derive(
434-
Component, Reflect, Debug, Clone, Copy, PartialEq, PartialOrd, Default, Deref, DerefMut, From,
435-
)]
433+
#[derive(Component, Reflect, Debug, Clone, Copy, PartialEq, PartialOrd, Deref, DerefMut, From)]
436434
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
437435
#[cfg_attr(feature = "serialize", reflect(Serialize, Deserialize))]
438436
#[reflect(Debug, Component, Default, PartialEq)]
439437
pub struct GravityScale(pub Scalar);
440438

439+
impl Default for GravityScale {
440+
fn default() -> Self {
441+
Self(1.0)
442+
}
443+
}
444+
441445
/// Determines how coefficients are combined for [`Restitution`] and [`Friction`].
442446
/// The default is `Average`.
443447
///

0 commit comments

Comments
 (0)