浏览代码

after-steps was missing, spring didn't work
solves https://github.com/BabylonJS/Babylon.js/issues/3095

Raanan Weber 7 年之前
父节点
当前提交
5c55e44c8e
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/Physics/babylon.physicsImpostor.ts

+ 4 - 0
src/Physics/babylon.physicsImpostor.ts

@@ -427,6 +427,10 @@ module BABYLON {
                 return;
                 return;
             }
             }
 
 
+            this._onAfterPhysicsStepCallbacks.forEach((func) => {
+                func(this);
+            });
+
             this._physicsEngine.getPhysicsPlugin().setTransformationFromPhysicsBody(this);
             this._physicsEngine.getPhysicsPlugin().setTransformationFromPhysicsBody(this);
             // object has now its world rotation. needs to be converted to local.
             // object has now its world rotation. needs to be converted to local.
             if (this.object.parent && this.object.rotationQuaternion) {
             if (this.object.parent && this.object.rotationQuaternion) {