David,
I'm sitting here trying to imagine a poor camera man trying to focus on a
tennis ball during a tennis match. To make things worse the camera man has a
view finder that switches on and off (the "frame rate").
It seems like the only way the camera man could do smooth panning would be
if:
- he had a sufficiently high "frame rate"
- he could roughly predict the new position of the tennis ball (which we all
learn to do with amazing accuracy)
I think you might get decent results if you store the last few positions of
the target object and create a running "delta" vector between frames. This
will allow you to "guess" where the object will be in the next frame, and
you should have the camera pointed there already. You will need a linear
interpolator to move the camera between the current position and predicted
position.
If simple linear prediction doesn't work (perhaps the frame rate is too low)
you may need to use the details of the spline curve the object is moving
along...?
If you don't need this "black box" approach derive your own class from
RotPosScaleTCBSplinePathInterpolator and update the position of the camera
everytime someone queries the position of the interpolator.
Interesting problem, let me know how it goes!
Sincerely,
Daniel Selman
[EMAIL PROTECTED]
http://www.tornadolabs.com
> -----Original Message-----
> From: Discussion list for Java 3D API
> [mailto:[EMAIL PROTECTED]]On Behalf Of David Hall�
> Sent: 10 February 2000 16:14
> To: [EMAIL PROTECTED]
> Subject: [JAVA3D] Synchronizing interpolator and view transformgroup
>
>
> Hi all!
>
> I've got a camera that is controlled by a behavior (say
> 'viewbehavior') wich
> wakeup criteria is a transformgroup changed transform3D. This
> transformgroup is
> controlled by an interpolator(another behavior). When my
> 'viewbehavior' wakes
> up, it takes the position of my object and change my camera in
> order to look at
> this object : I follow this object with my camera.
> My problem is that the first frame my object moves, and the next
> frame my camera
> moves to look at this object, and so on. The result is a very
> jerky movement!!!
> Anyone with an idea to solve this is welcome!
>
> Thanks,
> David.
>
>
> __________________________________________________________________
> ____________
> Si votre email etait sur iFrance vous pourriez ecouter ce message au tel !
> http://www.ifrance.com : ne laissez plus vos emails loin de vous ...
> gratuit sur iFrance : emails (20 MO, POP, FAX), Agenda, Site perso
>
> ==================================================================
> =========
> 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".
>
===========================================================================
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".