Browse Source

Merge pull request #6125 from bobalazek/patch-2

Ammo physics raycast fix
David Catuhe 6 năm trước cách đây
mục cha
commit
c8f5554920
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      src/Physics/Plugins/ammoJSPlugin.ts

+ 2 - 0
src/Physics/Plugins/ammoJSPlugin.ts

@@ -86,6 +86,8 @@ export class AmmoJSPlugin implements IPhysicsEnginePlugin {
 
         this._tmpAmmoConcreteContactResultCallback = new this.bjsAMMO.ConcreteContactResultCallback();
         this._tmpAmmoConcreteContactResultCallback.addSingleResult = () => { this._tmpContactCallbackResult = true; };
+        
+        this._raycastResult = new PhysicsRaycastResult();
 
         // Create temp ammo variables
         this._tmpAmmoTransform = new this.bjsAMMO.btTransform();