tags:

views:

49

answers:

1

Hi all,

I'm working on a game in Java3D. I read all my level info from a file and it works fine. But now I want to re-initialize the scene from reading data from a different file.

How do I reset the scene?

Should I just destroy the whole canvas3D and universe objects?

A: 

Thanks Mikeb, you put me on the right track.

I figured it out. You need to detach the branchgroup.

Like this:

if (sceneBG != null) {
   sceneBG.detach();
}
sceneBG = new BranchGroup();
sceneBG.setCapability(BranchGroup.ALLOW_DETACH);
Dan Howard