Add explicit wake_up parameter to method setting the position and velocity of a rigid-body.

This commit is contained in:
Crozet Sébastien
2020-11-19 18:09:55 +01:00
parent 49fd861083
commit 5ce3606582
14 changed files with 154 additions and 48 deletions

View File

@@ -72,17 +72,18 @@ impl QueryPipeline {
let mut result = None;
for handle in inter {
let collider = &colliders[handle];
if collider.collision_groups.test(groups) {
if let Some(inter) = collider.shape().toi_and_normal_with_ray(
collider.position(),
ray,
max_toi,
true,
) {
if inter.toi < best {
best = inter.toi;
result = Some((handle, collider, inter));
if let Some(collider) = colliders.get(handle) {
if collider.collision_groups.test(groups) {
if let Some(inter) = collider.shape().toi_and_normal_with_ray(
collider.position(),
ray,
max_toi,
true,
) {
if inter.toi < best {
best = inter.toi;
result = Some((handle, collider, inter));
}
}
}
}