summaryrefslogtreecommitdiff
path: root/servers/physics_2d/godot_physics_server_2d.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_2d/godot_physics_server_2d.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_2d/godot_physics_server_2d.h')
-rw-r--r--servers/physics_2d/godot_physics_server_2d.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/servers/physics_2d/godot_physics_server_2d.h b/servers/physics_2d/godot_physics_server_2d.h
index ad6d5e0940..bdf614a16d 100644
--- a/servers/physics_2d/godot_physics_server_2d.h
+++ b/servers/physics_2d/godot_physics_server_2d.h
@@ -207,19 +207,24 @@ public:
virtual void body_set_state(RID p_body, BodyState p_state, const Variant &p_variant) override;
virtual Variant body_get_state(RID p_body, BodyState p_state) const override;
- virtual void body_set_applied_force(RID p_body, const Vector2 &p_force) override;
- virtual Vector2 body_get_applied_force(RID p_body) const override;
-
- virtual void body_set_applied_torque(RID p_body, real_t p_torque) override;
- virtual real_t body_get_applied_torque(RID p_body) const override;
-
- virtual void body_add_central_force(RID p_body, const Vector2 &p_force) override;
- virtual void body_add_force(RID p_body, const Vector2 &p_force, const Vector2 &p_position = Vector2()) override;
- virtual void body_add_torque(RID p_body, real_t p_torque) override;
-
virtual void body_apply_central_impulse(RID p_body, const Vector2 &p_impulse) override;
virtual void body_apply_torque_impulse(RID p_body, real_t p_torque) override;
virtual void body_apply_impulse(RID p_body, const Vector2 &p_impulse, const Vector2 &p_position = Vector2()) override;
+
+ virtual void body_apply_central_force(RID p_body, const Vector2 &p_force) override;
+ virtual void body_apply_force(RID p_body, const Vector2 &p_force, const Vector2 &p_position = Vector2()) override;
+ virtual void body_apply_torque(RID p_body, real_t p_torque) override;
+
+ virtual void body_add_constant_central_force(RID p_body, const Vector2 &p_force) override;
+ virtual void body_add_constant_force(RID p_body, const Vector2 &p_force, const Vector2 &p_position = Vector2()) override;
+ virtual void body_add_constant_torque(RID p_body, real_t p_torque) override;
+
+ virtual void body_set_constant_force(RID p_body, const Vector2 &p_force) override;
+ virtual Vector2 body_get_constant_force(RID p_body) const override;
+
+ virtual void body_set_constant_torque(RID p_body, real_t p_torque) override;
+ virtual real_t body_get_constant_torque(RID p_body) const override;
+
virtual void body_set_axis_velocity(RID p_body, const Vector2 &p_axis_velocity) override;
virtual void body_add_collision_exception(RID p_body, RID p_body_b) override;