From e73e97f753a973229a7915ba3a2cdfc4215f6893 Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Mon, 16 May 2011 17:35:09 +0000 Subject: [PATCH] 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 --- engine/src/core/com/jme3/scene/control/BillboardControl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/core/com/jme3/scene/control/BillboardControl.java b/engine/src/core/com/jme3/scene/control/BillboardControl.java index a080f766c..ed91c25f9 100644 --- a/engine/src/core/com/jme3/scene/control/BillboardControl.java +++ b/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;