aboutsummaryrefslogtreecommitdiff
path: root/src/geometry/narrow_phase.rs
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2021-02-23 15:49:23 +0100
committerCrozet Sébastien <developer@crozet.re>2021-02-23 15:49:23 +0100
commitbabcab0bed23fadd23181ccc58aae34fb80d01d8 (patch)
treedcdb17f061860a93873659c55f029a8fbf5cbccc /src/geometry/narrow_phase.rs
parentf8bf96fdc8a0cfd7324d589736d41057a6c1bfe8 (diff)
downloadrapier-babcab0bed23fadd23181ccc58aae34fb80d01d8.tar.gz
rapier-babcab0bed23fadd23181ccc58aae34fb80d01d8.tar.bz2
rapier-babcab0bed23fadd23181ccc58aae34fb80d01d8.zip
Update the testbed to use PhysicsHooks.
Diffstat (limited to 'src/geometry/narrow_phase.rs')
-rw-r--r--src/geometry/narrow_phase.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/geometry/narrow_phase.rs b/src/geometry/narrow_phase.rs
index e929e0f..d05b19a 100644
--- a/src/geometry/narrow_phase.rs
+++ b/src/geometry/narrow_phase.rs
@@ -4,15 +4,15 @@ use rayon::prelude::*;
use crate::data::pubsub::Subscription;
use crate::data::Coarena;
use crate::dynamics::{BodyPair, CoefficientCombineRule, RigidBodySet};
-use crate::geometry::pair_filter::{ContactModificationContext, PhysicsHooksFlags};
use crate::geometry::{
- BroadPhasePairEvent, ColliderGraphIndex, ColliderHandle, ContactData, ContactEvent,
- ContactManifoldData, IntersectionEvent, PairFilterContext, PhysicsHooks, RemovedCollider,
- SolverContact, SolverFlags,
+ BroadPhasePairEvent, ColliderGraphIndex, ColliderHandle, ColliderSet, ContactData,
+ ContactEvent, ContactManifold, ContactManifoldData, ContactPair, InteractionGraph,
+ IntersectionEvent, RemovedCollider, SolverContact, SolverFlags,
};
-use crate::geometry::{ColliderSet, ContactManifold, ContactPair, InteractionGraph};
use crate::math::{Real, Vector};
-use crate::pipeline::EventHandler;
+use crate::pipeline::{
+ ContactModificationContext, EventHandler, PairFilterContext, PhysicsHooks, PhysicsHooksFlags,
+};
use parry::query::{DefaultQueryDispatcher, PersistentQueryDispatcher};
use parry::utils::IsometryOpt;
use std::collections::HashMap;
@@ -518,7 +518,7 @@ impl NarrowPhase {
return;
}
} else {
- SolverFlags::COMPUTE_IMPULSES
+ co1.solver_flags | co2.solver_flags
};
if !co1.solver_groups.test(co2.solver_groups) {
@@ -573,7 +573,7 @@ impl NarrowPhase {
dist: contact.dist,
friction,
restitution,
- surface_velocity: Vector::zeros(),
+ tangent_velocity: Vector::zeros(),
data: contact.data,
};