* Fixed yet another bug with transforms, this time in Spatial.worldToLocal

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7296 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
sha..rd 14 years ago
parent 8e6b51dac1
commit e6b11e8013
  1. 9
      engine/src/core/com/jme3/math/Transform.java

@ -253,8 +253,15 @@ public final class Transform implements Savable, Cloneable {
if (store == null) if (store == null)
store = new Vector3f(); store = new Vector3f();
in.subtract(translation, store).divideLocal(scale); // The author of this code should look above and take the inverse of that
// But for some reason, they didnt ..
// in.subtract(translation, store).divideLocal(scale);
// rot.inverse().mult(store, store);
in.subtract(translation, store);
rot.inverse().mult(store, store); rot.inverse().mult(store, store);
store.divideLocal(scale);
return store; return store;
} }

Loading…
Cancel
Save