Start implementing SAPLayer creation and insertion.

This commit is contained in:
Crozet Sébastien
2021-03-08 18:27:06 +01:00
parent 7983c25606
commit a967ace7d4
7 changed files with 235 additions and 57 deletions

View File

@@ -228,7 +228,11 @@ fn nphysics_collider_from_rapier_collider(
}
};
let density = if is_dynamic { collider.density() } else { 0.0 };
let density = if is_dynamic {
collider.density().unwrap_or(0.0)
} else {
0.0
};
Some(
ColliderDesc::new(shape)

View File

@@ -237,7 +237,7 @@ impl PhysxWorld {
let densities: Vec<_> = rb
.colliders()
.iter()
.map(|h| colliders[*h].density())
.map(|h| colliders[*h].density().unwrap_or(0.0))
.collect();
unsafe {