Browse Source

Take mass into account

Borut 7 năm trước cách đây
mục cha
commit
efd0f4c1c5
2 tập tin đã thay đổi với 8137 bổ sung8136 xóa
  1. 8136 8136
      dist/preview release/babylon.d.ts
  2. 1 0
      src/Physics/babylon.physicsHelper.ts

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 8136 - 8136
dist/preview release/babylon.d.ts


+ 1 - 0
src/Physics/babylon.physicsHelper.ts

@@ -173,6 +173,7 @@ module BABYLON {
             var multiplier = falloff === PhysicsRadialImpulseFallof.Constant
                 ? strength
                 : strength * (1 - (distanceFromOrigin / radius));
+            multiplier /= impostor.mass;
 
             var force = direction.multiplyByFloats(multiplier, multiplier, multiplier);