3PG, createFlyStraightAnimator and camera

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Lev_a
Posts: 52
Joined: Tue Jan 10, 2006 5:59 pm
Location: Toronto, Canada

3PG, createFlyStraightAnimator and camera

Post 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?
Lev_a
Posts: 52
Joined: Tue Jan 10, 2006 5:59 pm
Location: Toronto, Canada

Post 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();
Lev_a
Posts: 52
Joined: Tue Jan 10, 2006 5:59 pm
Location: Toronto, Canada

Post 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:
Post Reply