Browse Source

Merge pull request #6125 from bobalazek/patch-2

Ammo physics raycast fix
David Catuhe 6 years ago
parent
commit
c8f5554920
1 changed files with 2 additions and 0 deletions
  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();