Skip to content

Commit

Permalink
Merge pull request #28 from Demindiro/upgrade-rapier
Browse files Browse the repository at this point in the history
  • Loading branch information
Demindiro authored Jun 25, 2021
2 parents adea5af + 5603456 commit e304d97
Show file tree
Hide file tree
Showing 9 changed files with 207 additions and 162 deletions.
135 changes: 70 additions & 65 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rapier3d/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2018"
name = "godot_rapier3d"

[dependencies]
rapier3d = { git = "https://github.com/Demindiro/rapier", branch = "godot", version = "*", features = ["simd-nightly"] }
rapier3d = { git = "https://github.com/Demindiro/rapier", branch = "godot-0.9", version = "*", features = ["simd-nightly"] }
gdnative = "*"
lazy_static = "*"

Expand Down
8 changes: 4 additions & 4 deletions rapier3d/src/area.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ impl Area {
/// Sets the space of this area. This removes the area from it's current space, if any.
pub fn set_space(&mut self, space: Option<SpaceIndex>) {
// Judging by the API areas are intended to be moved around, so use kinematic
let instance = Instance::Loose(RigidBodyBuilder::new_kinematic().build());
let instance = Instance::Loose(RigidBodyBuilder::new_kinematic_position_based().build());
let instance = mem::replace(&mut self.instance, instance);
let body = match instance {
Instance::Attached((body, _), space) => space
Expand Down Expand Up @@ -493,12 +493,12 @@ impl Area {

/// Sets the collision layer of this area
pub fn set_layer(&mut self, layer: u32) {
self.interaction_groups = self.interaction_groups.with_groups(layer);
self.interaction_groups = self.interaction_groups.with_memberships(layer);
}

/// Sets the collision masj of this area
/// Sets the collision mask of this area
pub fn set_mask(&mut self, mask: u32) {
self.interaction_groups = self.interaction_groups.with_mask(mask);
self.interaction_groups = self.interaction_groups.with_filter(mask);
}

/// Stores the area's index in the given [`Collider`]
Expand Down
Loading

0 comments on commit e304d97

Please sign in to comment.