Add get_contact_impulse method to PhysicsDirectBodyState2D

This makes it consistent with 3D.
This commit is contained in:
Ricardo Buring 2023-01-10 23:28:02 +01:00
parent 91713ced81
commit 3efa105548
11 changed files with 48 additions and 20 deletions

View file

@ -59,6 +59,7 @@ class GodotBodyPair2D : public GodotConstraint2D {
Vector2 position;
Vector2 normal;
Vector2 local_A, local_B;
Vector2 acc_impulse; // accumulated impulse
real_t acc_normal_impulse = 0.0; // accumulated normal impulse (Pn)
real_t acc_tangent_impulse = 0.0; // accumulated tangent impulse (Pt)
real_t acc_bias_impulse = 0.0; // accumulated normal impulse for position bias (Pnb)