kripken / ammo.js

Direct port of the Bullet physics engine to JavaScript using Emscripten

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rotation not what is set

stevedekorte opened this issue · comments

Example:

const a = [-0.0000064798259700182825, -0.0013201627880334854, 0.0000027575993044592906, 0.9999991059303284]
const t = new Ammo.btTransform();
t.setIdentity();
t.setRotation(new Ammo.btQuaternion(a[0], a[1], a[2], a[3]));
const r = t.getRotation()
// a is (very slightly) not equal to [r.x(), r.y(), r.z(), r.w()]

Any suggestions would be welcome. Thanks!