QueryPipeline: add shape casting, point projection, and intersection queries.

This commit is contained in:
Crozet Sébastien
2020-12-31 16:30:38 +01:00
parent 1feac2e02d
commit 7b098606c2
4 changed files with 216 additions and 43 deletions

View File

@@ -1032,10 +1032,12 @@ impl Testbed {
&self.physics.colliders,
&ray,
f32::MAX,
true,
InteractionGroups::all(),
);
if let Some((_, collider, _)) = hit {
if let Some((handle, _)) = hit {
let collider = &self.physics.colliders[handle];
if self.physics.bodies[collider.parent()].is_dynamic() {
self.state.highlighted_body = Some(collider.parent());
for node in self.graphics.body_nodes_mut(collider.parent()).unwrap() {