summaryrefslogtreecommitdiff
path: root/servers/physics_server_2d_wrap_mt.h
diff options
context:
space:
mode:
authorCamille Mohr-Daurat <pouleyKetchoup@gmail.com>2021-12-10 17:16:28 -0700
committerGitHub <noreply@github.com>2021-12-10 17:16:28 -0700
commitf1ca14cc8daf7529569a11c9209c18f8f73e837a (patch)
tree937b7a7c559d6c2394cceb1874131df7b80bde0e /servers/physics_server_2d_wrap_mt.h
parentc6fe431a02a490aa42d8cbf5d573feb6edc7f0a8 (diff)
parent940f3fde5c5f902b6efd0f35fb6c7d23edd1da14 (diff)
Merge pull request #55736 from nekomatata/physics-apply-forces
Improve RigidDynamicBody force and torque API
Diffstat (limited to 'servers/physics_server_2d_wrap_mt.h')
-rw-r--r--servers/physics_server_2d_wrap_mt.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/servers/physics_server_2d_wrap_mt.h b/servers/physics_server_2d_wrap_mt.h
index f65c8921ce..cb6e6fc084 100644
--- a/servers/physics_server_2d_wrap_mt.h
+++ b/servers/physics_server_2d_wrap_mt.h
@@ -213,18 +213,24 @@ public:
FUNC3(body_set_state, RID, BodyState, const Variant &);
FUNC2RC(Variant, body_get_state, RID, BodyState);
- FUNC2(body_set_applied_force, RID, const Vector2 &);
- FUNC1RC(Vector2, body_get_applied_force, RID);
-
- FUNC2(body_set_applied_torque, RID, real_t);
- FUNC1RC(real_t, body_get_applied_torque, RID);
-
- FUNC2(body_add_central_force, RID, const Vector2 &);
- FUNC3(body_add_force, RID, const Vector2 &, const Vector2 &);
- FUNC2(body_add_torque, RID, real_t);
FUNC2(body_apply_central_impulse, RID, const Vector2 &);
FUNC2(body_apply_torque_impulse, RID, real_t);
FUNC3(body_apply_impulse, RID, const Vector2 &, const Vector2 &);
+
+ FUNC2(body_apply_central_force, RID, const Vector2 &);
+ FUNC3(body_apply_force, RID, const Vector2 &, const Vector2 &);
+ FUNC2(body_apply_torque, RID, real_t);
+
+ FUNC2(body_add_constant_central_force, RID, const Vector2 &);
+ FUNC3(body_add_constant_force, RID, const Vector2 &, const Vector2 &);
+ FUNC2(body_add_constant_torque, RID, real_t);
+
+ FUNC2(body_set_constant_force, RID, const Vector2 &);
+ FUNC1RC(Vector2, body_get_constant_force, RID);
+
+ FUNC2(body_set_constant_torque, RID, real_t);
+ FUNC1RC(real_t, body_get_constant_torque, RID);
+
FUNC2(body_set_axis_velocity, RID, const Vector2 &);
FUNC2(body_add_collision_exception, RID, RID);