Pārlūkot izejas kodu

BillboardControl :
- applied a patch from Abies to fix align to axis behaviour.
http://jmonkeyengine.org/groups/graphics/forum/topic/billboard-control-having-issues-when-parent-node-is-being-rotated/#post-127586

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7505 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

rem..om 14 gadi atpakaļ
vecāks
revīzija
e73e97f753

+ 2 - 2
engine/src/core/com/jme3/scene/control/BillboardControl.java

@@ -205,8 +205,8 @@ public class BillboardControl extends AbstractControl {
         // the camera. To do this, the camera must be inverse-transformed into
         // the model space of the billboard.
         look.set(camera.getLocation()).subtractLocal(
-                spatial.getWorldTranslation());
-        spatial.getWorldRotation().mult(look, left); // coopt left for our own
+                spatial.getWorldTranslation());   
+        spatial.getParent().getWorldRotation().mult(look, left); // coopt left for our own
         // purposes.
         left.x *= 1.0f / spatial.getWorldScale().x;
         left.y *= 1.0f / spatial.getWorldScale().y;