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 /scene/3d/physics_body_3d.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 'scene/3d/physics_body_3d.h')
-rw-r--r-- | scene/3d/physics_body_3d.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/scene/3d/physics_body_3d.h b/scene/3d/physics_body_3d.h index 2ea796d335..beed8a6b36 100644 --- a/scene/3d/physics_body_3d.h +++ b/scene/3d/physics_body_3d.h @@ -306,14 +306,24 @@ public: Array get_colliding_bodies() const; - void add_central_force(const Vector3 &p_force); - void add_force(const Vector3 &p_force, const Vector3 &p_position = Vector3()); - void add_torque(const Vector3 &p_torque); - void apply_central_impulse(const Vector3 &p_impulse); void apply_impulse(const Vector3 &p_impulse, const Vector3 &p_position = Vector3()); void apply_torque_impulse(const Vector3 &p_impulse); + void apply_central_force(const Vector3 &p_force); + void apply_force(const Vector3 &p_force, const Vector3 &p_position = Vector3()); + void apply_torque(const Vector3 &p_torque); + + void add_constant_central_force(const Vector3 &p_force); + void add_constant_force(const Vector3 &p_force, const Vector3 &p_position = Vector3()); + void add_constant_torque(const Vector3 &p_torque); + + void set_constant_force(const Vector3 &p_force); + Vector3 get_constant_force() const; + + void set_constant_torque(const Vector3 &p_torque); + Vector3 get_constant_torque() const; + virtual TypedArray<String> get_configuration_warnings() const override; RigidDynamicBody3D(); |