Author Topic: How to change visibility of AnimatedGroup?  (Read 1029 times)

Offline zbych

  • int
  • **
  • Posts: 75
    • View Profile
How to change visibility of AnimatedGroup?
« on: July 28, 2012, 04:44:03 pm »
Hi.

I was try to change visibility of AnimatedGroup with something like this:

Code: [Select]
animGroup.getRoot().setVisibility(false);
but it is not working. How can I change the visiblitiy of animated group? I can remove it from world but in that case I have to give lower level objects access to World object.

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: How to change visibility of AnimatedGroup?
« Reply #1 on: July 28, 2012, 05:03:28 pm »
root object is for easily moving and rotating the group.

use this:
Code: [Select]
for (Animated3D o : animatedGroup) {
    o.setVisibility(false);
}

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: How to change visibility of AnimatedGroup?
« Reply #2 on: July 28, 2012, 06:13:13 pm »
or you can use the new method AnimatedGroup.setVisibility(..)