Joost Verschuren wrote: >In an application I need a tethered viewplatform (a camera attached to an >object moving in space; the target object should always be in the center of the screen). >Updating the position and orientation of the target object and viewplatform is done in the preRender() callback function. First the transform group of the target object is updated. Then the transformgroup of the viewplatform is calculated from the transformgroup of the target object. >Most of the time this will work but sometimes the view flickers. It looks >like the viewplatform transform is one frame behind the target transform for >a frame. The next frame the camera seems to target the object OK. > >Does anybody have an idea what happens here?
No. But I don't think it's a particular good idea to manipulate scenegraph nodes in preRender(). We have the same problem and a working solution. We use a single Behavior that first places all objects (in your case the 'target') and afterwards you can place the camera. This should make sure that the change is always consistent. In fact, we did it another way. We just placed the ViewPlatform object in the scenegraph beneath our target object, putting one TransformGroup with an offset in between. This makes sure that the 'camera' always follows the object w/o manipulating the ViewPlatform at all. Works as declared, so to say. Does this help? - J -- Joerg 'Herkules' Plewe http://www.hardcode.de =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".