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
This commit is contained in:
parent
bc8162104f
commit
e73e97f753
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user