Skip to content

Commit

Permalink
Physics fix (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
ManevilleF authored Jul 10, 2024
1 parent 8b9e380 commit fb9094c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ default-features = false
features = ["bevy_render", "bevy_asset"]

[dependencies.bevy_rapier3d]
version = "0.25"
version = "0.26"
optional = true
default-features = false
features = ["dim3", "async-collider"]
Expand All @@ -39,10 +39,10 @@ default-features = false
features = ["3d", "f32", "async-collider", "default-collider", "parry-f32"]

[dev-dependencies]
bevy-inspector-egui = "0.23"
bevy-inspector-egui = "0.24"
rand = "0.8"
bevy_xpbd_3d = "0.4"
bevy_rapier3d = "0.25"
bevy_rapier3d = "0.26"

[dev-dependencies.bevy]
version = "0.13"
Expand Down
2 changes: 1 addition & 1 deletion src/components/cloth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ impl Cloth {
.previous_point_positions
.get(i)
.map_or(Vec3::ZERO, |prev| *point - *prev);
*point += velocity * friction + acceleration;
*point += velocity * friction + acceleration * friction;
}
}
self.previous_point_positions = position_cache;
Expand Down
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl Default for ClothConfig {
fn default() -> Self {
Self {
gravity: Vec3::Y * Self::DEFAULT_GRAVITY,
friction: 0.02,
friction: 0.01,
sticks_computation_depth: 5,
acceleration_smoothing: Default::default(),
}
Expand Down

0 comments on commit fb9094c

Please sign in to comment.