Page 1 of 1

3PG, createFlyStraightAnimator and camera

Posted: Wed Mar 15, 2006 9:40 pm
by Lev_a
I have array of positions my model (30 positions per second) - like race.
And I have array of positions following camera.
I use:

Code: Select all

ModelAnim = smgr->createFlyStraightAnimator(vector3df(leaderPosition[currentSlice]), vector3df(leaderPosition[currentSlice + 1]), 1000 / 30);

Model->addAnimator(ModelAnim);
ModelAnim->drop();			

CameraAnim = smgr->createFlyStraightAnimator(vector3df(cameraPosition[currentSlice]), vector3df(cameraPosition[currentSlice + 1]), 1000 / 30);

camera->addAnimator(CameraAnim);
CameraAnim->drop();			
If model moved and camera moved - everything fine, but when you watching on background or another static object - it's a litlle bit jumped.
My game working at ~45-50 FPS.
I already tryed to change array up to 50 positions per second - doesn't effect at all.
Is it some issues with createFlyStraightAnimator?

Posted: Thu Mar 16, 2006 4:08 pm
by Lev_a
Using http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=12038

I changed createFlyStraightAnimator for SetPosition + UpdateAbsoluteposition and still I have static objects shaked.

Code: Select all

ModelAnim->setPosition(vector3df(leaderPosition[currentSlice]); 
ModelAnim->updateAbsolutePosition();

CameraAnim->setPosition(vector3df(cameraPosition[currentSlice]); 
CameraAnim->updateAbsolutePosition();

Posted: Thu Mar 16, 2006 4:14 pm
by Lev_a
I think my model and camera shaked together and static object looks like shaked - it's mean model and camera not moving smoothly.
Any ideas?
Sorry for spam :oops: