I want to use CSceneNodeAnimatorFollowSpline for animating my camera. But I don't want the animation to loop. Is there any way to know if the animation is finished so I can stop the animation?
BR
pir
Can CSceneNodeAnimatorFollowSpline be set to not looping?
Sorry, SceneNodeAnimatorFollowSpline misses a loop parameter so far. So for now you have to create your own animator. Just copy CSceneNodeAnimatorFollowSpline.cpp and .h rename the classes for a start.
Then derive your animator from ISceneNodeAnimatorFinishing instead of ISceneNodeAnimator.
And in animateNode you should probably change that line:
in something like that (untested):
If you add this to the feature-tracker you increase the chance that we think of adding this to the engine.
Then derive your animator from ISceneNodeAnimatorFinishing instead of ISceneNodeAnimator.
And in animateNode you should probably change that line:
Code: Select all
const s32 idx = core::floor32( dt ) % pSize;
Code: Select all
const s32 idx = core::floor32( dt );
if ( idx >= pSize )
{
HasFinished = true;
node->setPosition(Points[pSize-1]);
return;
}
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
has this been added to the engine yet?
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
No, not yet.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Loop and pingpong have noow been added to svn trunk and will be in Irrlicht 1.7.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm