Sorry about the confusion, I'll try to explain:
you say the code to transform the scene is in behaviors
I never said that the behaviors transform the scene, I said that the behaviors are "connected" to these transforms (TransformGroups) like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| public My3DBehavior(TransformGroup aTransformGroup) { transformGroup = aTransformGroup; wakeupCondition = new WakeupOnTransformChange(transformGroup); }
public void initialize() { wakeupOn(wakeupCondition); }
public void processStimulus(Enumeration e) { System.out.println("TransformGroup has been modified!"); doWork(); wakeupOn(wakeupCondition); } |
So the problem again is that if the Canvas3D is not made visible, the 'processStimulus()' of 'My3DBehavior' will not be called, even though the TransformGroup is modified. As soon as the Canvas3D is made visible, all further transforms on the TransformGroup is caught by the behavior.
Please let me know if there is need for further explaination. Thank-you.
P.S. I was already using setEnabed(true).