diff options
author | Ricardo Buring <ricardo.buring@gmail.com> | 2023-01-10 23:28:02 +0100 |
---|---|---|
committer | Ricardo Buring <ricardo.buring@gmail.com> | 2023-01-10 23:28:02 +0100 |
commit | 3efa10554824d2e3af797061b04e0653cd463292 (patch) | |
tree | da42b7aec8dc1e401d7efa2ce7c4b4093cc086a5 /servers/extensions | |
parent | 91713ced81792b10fdc9367b7f355738e5d52777 (diff) |
Add get_contact_impulse method to PhysicsDirectBodyState2D
This makes it consistent with 3D.
Diffstat (limited to 'servers/extensions')
-rw-r--r-- | servers/extensions/physics_server_2d_extension.cpp | 1 | ||||
-rw-r--r-- | servers/extensions/physics_server_2d_extension.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/servers/extensions/physics_server_2d_extension.cpp b/servers/extensions/physics_server_2d_extension.cpp index a0c082ee44..a174ceadac 100644 --- a/servers/extensions/physics_server_2d_extension.cpp +++ b/servers/extensions/physics_server_2d_extension.cpp @@ -101,6 +101,7 @@ void PhysicsDirectBodyState2DExtension::_bind_methods() { GDVIRTUAL_BIND(_get_contact_collider_object, "contact_idx"); GDVIRTUAL_BIND(_get_contact_collider_shape, "contact_idx"); GDVIRTUAL_BIND(_get_contact_collider_velocity_at_position, "contact_idx"); + GDVIRTUAL_BIND(_get_contact_impulse, "contact_idx"); GDVIRTUAL_BIND(_get_step); GDVIRTUAL_BIND(_integrate_forces); diff --git a/servers/extensions/physics_server_2d_extension.h b/servers/extensions/physics_server_2d_extension.h index c4970f6398..0008653f66 100644 --- a/servers/extensions/physics_server_2d_extension.h +++ b/servers/extensions/physics_server_2d_extension.h @@ -100,6 +100,7 @@ public: EXBIND1RC(Object *, get_contact_collider_object, int) EXBIND1RC(int, get_contact_collider_shape, int) EXBIND1RC(Vector2, get_contact_collider_velocity_at_position, int) + EXBIND1RC(Vector2, get_contact_impulse, int) EXBIND0RC(real_t, get_step) EXBIND0(integrate_forces) |