Merge pull request #37822 from nekomatata/rigid-body-force-pos
Fix add_force in Godot Physics RigidBody
This commit is contained in:
commit
1846d33b5f
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue