diff options
author | Camille Mohr-Daurat <pouleyKetchoup@gmail.com> | 2021-12-10 17:16:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-10 17:16:28 -0700 |
commit | f1ca14cc8daf7529569a11c9209c18f8f73e837a (patch) | |
tree | 937b7a7c559d6c2394cceb1874131df7b80bde0e /servers/physics_server_3d_wrap_mt.h | |
parent | c6fe431a02a490aa42d8cbf5d573feb6edc7f0a8 (diff) | |
parent | 940f3fde5c5f902b6efd0f35fb6c7d23edd1da14 (diff) |
Merge pull request #55736 from nekomatata/physics-apply-forces
Improve RigidDynamicBody force and torque API
Diffstat (limited to 'servers/physics_server_3d_wrap_mt.h')
-rw-r--r-- | servers/physics_server_3d_wrap_mt.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/servers/physics_server_3d_wrap_mt.h b/servers/physics_server_3d_wrap_mt.h index e6dc2d8ed9..179ca90a2f 100644 --- a/servers/physics_server_3d_wrap_mt.h +++ b/servers/physics_server_3d_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 Vector3 &); - FUNC1RC(Vector3, body_get_applied_force, RID); - - FUNC2(body_set_applied_torque, RID, const Vector3 &); - FUNC1RC(Vector3, body_get_applied_torque, RID); - - FUNC2(body_add_central_force, RID, const Vector3 &); - FUNC3(body_add_force, RID, const Vector3 &, const Vector3 &); - FUNC2(body_add_torque, RID, const Vector3 &); FUNC2(body_apply_torque_impulse, RID, const Vector3 &); FUNC2(body_apply_central_impulse, RID, const Vector3 &); FUNC3(body_apply_impulse, RID, const Vector3 &, const Vector3 &); + + FUNC2(body_apply_central_force, RID, const Vector3 &); + FUNC3(body_apply_force, RID, const Vector3 &, const Vector3 &); + FUNC2(body_apply_torque, RID, const Vector3 &); + + FUNC2(body_add_constant_central_force, RID, const Vector3 &); + FUNC3(body_add_constant_force, RID, const Vector3 &, const Vector3 &); + FUNC2(body_add_constant_torque, RID, const Vector3 &); + + FUNC2(body_set_constant_force, RID, const Vector3 &); + FUNC1RC(Vector3, body_get_constant_force, RID); + + FUNC2(body_set_constant_torque, RID, const Vector3 &); + FUNC1RC(Vector3, body_get_constant_torque, RID); + FUNC2(body_set_axis_velocity, RID, const Vector3 &); FUNC3(body_set_axis_lock, RID, BodyAxis, bool); |