Skip to main content

Multiple cameras

1 reply [Last post]
John_Kruger
Offline
Joined: 2006-02-17
Points: 0

Hello,

I've the following problem:
I've created a scenegraph with a rocket flying in a circle above a group of geometric objects. I need to put a camera on the ground (done) and two onboard the rocket. The idea is that the user will be able to click a button to switch asynchronously between the views. The camera on the ground is done, bcs I used the ViewPlatform from simpleU.getViewingPlatform(), then got the VP's platform transform and moved it into place. However, the rocket is harder because its a transformgroup with a rotator, etc, and the ViewingPlatform only wants a Transform3D, not a full blown TransformGroup.
I've tried inserting a ViewPlatform with the rocket, and setting it = myCanvas3D.getView().attachViewPlatform(cam1) but the JRE complains:
"javax.media.j3d.RestrictedAccessException: Group: only a BranchGroup node may be added..." Any help is _greatly_ appreciated.

-John

PS: I'm more than willing to post my code for review.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
John_Kruger
Offline
Joined: 2006-02-17
Points: 0

No worries, I figured it out, thanks to nitro's reply to chris_j_pook's message. Thanks a ton, nitro!

-John