diff options
| author | Sébastien Crozet <developer@crozet.re> | 2021-02-25 15:53:06 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-25 15:53:06 +0100 |
| commit | 1c5601c84bf5ca3b7fd611cc4b4fd7030526f71f (patch) | |
| tree | 11f2e197a7dfd16e7d527e198c4460df435a2cdd /src/geometry | |
| parent | f41a6fb76d2a762e7d0680dec25e2a48b701606e (diff) | |
| parent | f53d0438ed63417684c961ece307f8dc57ac7a5c (diff) | |
| download | rapier-1c5601c84bf5ca3b7fd611cc4b4fd7030526f71f.tar.gz rapier-1c5601c84bf5ca3b7fd611cc4b4fd7030526f71f.tar.bz2 rapier-1c5601c84bf5ca3b7fd611cc4b4fd7030526f71f.zip | |
Merge pull request #124 from dimforge/modify_contact_normal
Contact modification: make the contact normal modifiable too.
Diffstat (limited to 'src/geometry')
| -rw-r--r-- | src/geometry/narrow_phase.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/geometry/narrow_phase.rs b/src/geometry/narrow_phase.rs index 28c53f1..9c635dc 100644 --- a/src/geometry/narrow_phase.rs +++ b/src/geometry/narrow_phase.rs @@ -594,6 +594,7 @@ impl NarrowPhase { let mut modifiable_solver_contacts = std::mem::replace(&mut manifold.data.solver_contacts, Vec::new()); let mut modifiable_user_data = manifold.data.user_data; + let mut modifiable_normal = manifold.data.normal; let mut context = ContactModificationContext { rigid_body1: rb1, @@ -604,12 +605,14 @@ impl NarrowPhase { collider2: co2, manifold, solver_contacts: &mut modifiable_solver_contacts, + normal: &mut modifiable_normal, user_data: &mut modifiable_user_data, }; hooks.modify_solver_contacts(&mut context); manifold.data.solver_contacts = modifiable_solver_contacts; + manifold.data.normal = modifiable_normal; manifold.data.user_data = modifiable_user_data; } } |
