Skip to content

Commit

Permalink
fix lock rotation 3d (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ughuuu authored Oct 15, 2024
1 parent 594b3f5 commit b586afa
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ publish = false
crate-type = ["cdylib"]

[features]
default = ["build2d", "test"]
default = ["build3d", "test"]
test = []
build2d = ["single-dim2", "serde-serialize", "simd-stable"]
build3d = ["single-dim3", "serde-serialize", "simd-stable"]
Expand Down
2 changes: 1 addition & 1 deletion bin2d/addons/godot-rapier2d/plugin.info.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
name="Godot Rapier 2D"
description="A 2D and 3D drop-in replacement for the Godot engine that adds stability and fluids."
author="appsinacup"
version="0.8.7"
version="0.8.8"
flavour="<flavour>"
script=""
2 changes: 1 addition & 1 deletion bin3d/addons/godot-rapier3d/plugin.info.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
name="Godot Rapier 3D"
description="A 2D and 3D drop-in replacement for the Godot engine that adds stability and fluids."
author="appsinacup"
version="0.8.7"
version="0.8.8"
flavour="<flavour>"
script=""
6 changes: 0 additions & 6 deletions src/bodies/rapier_body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,6 @@ impl RapierBody {
} else {
self.axis_lock & (!axis.ord() as u8)
};
#[cfg(feature = "dim3")]
self.apply_axis_lock(physics_engine);
}

Expand All @@ -420,11 +419,6 @@ impl RapierBody {
if !self.base.is_valid() {
return;
}
if self.base.mode == BodyMode::RIGID_LINEAR {
self.axis_lock |= LockedAxes::ROTATION_LOCKED.bits();
} else {
self.axis_lock &= !LockedAxes::ROTATION_LOCKED.bits();
}
if let Some(axis_lock) = LockedAxes::from_bits(self.axis_lock) {
physics_engine.body_set_axis_lock(
self.base.get_space_id(),
Expand Down

0 comments on commit b586afa

Please sign in to comment.