Hey Guys… Yo @Deltakosh … How can FLIP the Y -Axis of a Quaternion using the setting of the X,Y,Z,W values ???
I know i can convert the quaternion to euler then invert the Y -axis then convert back to quaternion… but that seems like a alot of work in the an update loop.
I cam trying to sync a physics world transform with the babylon mesh transform:
var tm = this.physicsBody.getWorldTransform(i); var p = tm.getOrigin(); var q = tm.getRotation(); this.babylonMesh.position.set(p.x(), p.y(), p.z()); this.babylonMesh.rotationQuaternion.set(q.x(), q.y(), q.z(), q.w());
This actually updates my babylon mesh EXCEPT the quaternion is INVERTED on the y and my wheels are flipped around the wrong way… I need to FLIP that quaternion around… I thought i could just multiply the Z and W by -1.0 but that did not work…
What should i do ???