diff options
Diffstat (limited to 'servers/physics_3d/godot_body_pair_3d.cpp')
-rw-r--r-- | servers/physics_3d/godot_body_pair_3d.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/servers/physics_3d/godot_body_pair_3d.cpp b/servers/physics_3d/godot_body_pair_3d.cpp index 457abfb71a..f7d9ed9ee9 100644 --- a/servers/physics_3d/godot_body_pair_3d.cpp +++ b/servers/physics_3d/godot_body_pair_3d.cpp @@ -495,8 +495,7 @@ void GodotBodyPair3D::solve(real_t p_step) { Vector3 temp1 = inv_inertia_tensor_A.xform(c.rA.cross(tv)); Vector3 temp2 = inv_inertia_tensor_B.xform(c.rB.cross(tv)); - real_t t = -tvl / - (inv_mass_A + inv_mass_B + tv.dot(temp1.cross(c.rA) + temp2.cross(c.rB))); + real_t t = -tvl / (inv_mass_A + inv_mass_B + tv.dot(temp1.cross(c.rA) + temp2.cross(c.rB))); Vector3 jt = t * tv; @@ -863,8 +862,7 @@ void GodotBodySoftBodyPair3D::solve(real_t p_step) { Vector3 temp1 = body_inv_inertia_tensor.xform(c.rA.cross(tv)); - real_t t = -tvl / - (body_inv_mass + node_inv_mass + tv.dot(temp1.cross(c.rA))); + real_t t = -tvl / (body_inv_mass + node_inv_mass + tv.dot(temp1.cross(c.rA))); Vector3 jt = t * tv; |