瀏覽代碼

Fixed `worldToLocal` method to correctly handle store parameter for quaternion transformations.

zzuegg 3 月之前
父節點
當前提交
3a43016fad
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      jme3-core/src/main/java/com/jme3/scene/Spatial.java

+ 2 - 0
jme3-core/src/main/java/com/jme3/scene/Spatial.java

@@ -997,6 +997,8 @@ public abstract class Spatial implements Savable, Cloneable, Collidable,
         checkDoTransformUpdate();
         checkDoTransformUpdate();
         if(store == null){
         if(store == null){
             store=new Quaternion(in);
             store=new Quaternion(in);
+        }else{
+            store.set(in);
         }
         }
         store.multLocal(worldTransform.getRotation().inverse());
         store.multLocal(worldTransform.getRotation().inverse());
         return store;
         return store;