Procházet zdrojové kódy

Oimo quaternion fix

Normalizing the quaternion coming back from Oimo, as it can be returned
unnormalized when constantly updated from Babylon.js.
This extra call can also be called when sending the quaternion TO oimo,
but this is an extra call per frame, which might not be needed.
Raanan Weber před 9 roky
rodič
revize
651ea6652d
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1 0
      src/Physics/Plugins/babylon.oimoJSPlugin.ts

+ 1 - 0
src/Physics/Plugins/babylon.oimoJSPlugin.ts

@@ -307,6 +307,7 @@ module BABYLON {
 
 
                 }
                 }
                 impostor.object.rotationQuaternion.copyFrom(impostor.physicsBody.getQuaternion());
                 impostor.object.rotationQuaternion.copyFrom(impostor.physicsBody.getQuaternion());
+                impostor.object.rotationQuaternion.normalize();
             }
             }
         }
         }