summaryrefslogtreecommitdiff
path: root/servers/physics_3d/godot_body_pair_3d.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-08 22:40:06 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-08 22:40:06 +0100
commit1e32a286f3a912a6bd78625c77aa7b0d1a935d2f (patch)
tree914c23c577810404e0f1d9b50292fef79b43ec3f /servers/physics_3d/godot_body_pair_3d.h
parent30b3434daacc708276d13fbc0ff04f32e19a1d24 (diff)
parent8ee6264cc914fe1d007faf440fe4fda28b567cc6 (diff)
Merge pull request #70281 from CherrySodaPop/get-impulse-3d
Implement collision impulse in Godot Physics 3D
Diffstat (limited to 'servers/physics_3d/godot_body_pair_3d.h')
-rw-r--r--servers/physics_3d/godot_body_pair_3d.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/servers/physics_3d/godot_body_pair_3d.h b/servers/physics_3d/godot_body_pair_3d.h
index d69215f145..c3165c7fcf 100644
--- a/servers/physics_3d/godot_body_pair_3d.h
+++ b/servers/physics_3d/godot_body_pair_3d.h
@@ -44,6 +44,7 @@ protected:
Vector3 normal;
int index_A = 0, index_B = 0;
Vector3 local_A, local_B;
+ Vector3 acc_impulse; // accumulated impulse - only one of the object's impulse is needed as impulse_a == -impulse_b
real_t acc_normal_impulse = 0.0; // accumulated normal impulse (Pn)
Vector3 acc_tangent_impulse; // accumulated tangent impulse (Pt)
real_t acc_bias_impulse = 0.0; // accumulated normal impulse for position bias (Pnb)