Merge pull request #37822 from nekomatata/rigid-body-force-pos

Fix add_force in Godot Physics RigidBody
This commit is contained in:
Rémi Verschelde 2020-04-12 11:46:22 +02:00 committed by GitHub
commit 1846d33b5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -257,7 +257,7 @@ public:
_FORCE_INLINE_ void add_force(const Vector3 &p_force, const Vector3 &p_pos) {
applied_force += p_force;
applied_torque += p_pos.cross(p_force);
applied_torque += (p_pos - center_of_mass).cross(p_force);
}
_FORCE_INLINE_ void add_torque(const Vector3 &p_torque) {