[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.gef3d] Re: interpolated animation

On 2009-06-16 01:57:13 -0700, Jens v.P. <developer@xxxxxxxxx> said:

Hi Miles,

On 2009-06-16 01:17:16 +0200, Miles Parker <milesparker@xxxxxxxxx> said:

OK, this is waaay out on the "some day would be nice" frontier, but I'm wondering if there is any way to get animation for figures that have moved between refreshes, ala GEF. (Actyually, I haven't had great success getting this to work there anyway.)

Since GEF3D uses the very same update mechanisms as GEF, GEF animations should work similarly as well. SO you may start with a GEF animation and then try the very same animation in a 3D-fied editor.


We have already camera animation working, simply by using a Timer and a TimerTask. The camera is then simply moved like that:

@Override

public void run() {

	final Vector3fImpl newPos = new Vector3fImpl();

	Math3D.add(camera.getPosition(null), delta, newPos);

	Display.getDefault().asyncExec(new Runnable(){

		public void run(){

			camera.moveTo(newPos.x, newPos.y, newPos.z);

		}});

}


There doesn't seem to be anyway to get the current camera target.. (Where the camera is looking..) When I try to animate the camera, it is really jerky, and I'd like to do a kind of pan movement but to do that I htink I need to know where the camera is currently pointed..?