Frame End
Frame End
Whats the best way to check for the end of an animation cycle, without the animation callback. I thought I asked this before for Irrlicht and so I searched my post but couldn't find it. PHPBB's search is rubbish also.
Ride the Spiral Development:
spiralride.blogspot.com
spiralride.blogspot.com
Re: Frame End
I doubt there is a way...Taymo wrote:Whats the best way to check for the end of an animation cycle, without the animation callback.
maybe you can do something with IAnimatedMeshSceneNode::getFrameNr() ???
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
hi
i dont know whats is correct, but i do this way:
first, set the animation to not loop.
then you have two functions:
node->getFrameNr() -> gets the current frame
node->getEndFrame() -> gets the current animation loops last frame what you've set at node->setAnimationLoop
and just check if they're equal.
but remember it doesn't work if you set it to looping
i dont know whats is correct, but i do this way:
first, set the animation to not loop.
then you have two functions:
node->getFrameNr() -> gets the current frame
node->getEndFrame() -> gets the current animation loops last frame what you've set at node->setAnimationLoop
and just check if they're equal.
but remember it doesn't work if you set it to looping
Re: Frame End
That's the way I'm doing it now. I store animation cycles and check to see if the animation cycles end like B@z suggested, but I had set the loop mode to true, so I wasn't getting the numbers I need. This problem's solved. Thanks B@z and Acki.Acki wrote:I doubt there is a way...Taymo wrote:Whats the best way to check for the end of an animation cycle, without the animation callback.
maybe you can do something with IAnimatedMeshSceneNode::getFrameNr() ???
Ride the Spiral Development:
spiralride.blogspot.com
spiralride.blogspot.com
Yep thanks. I bet an animation system with an editor would be a fun extension for Irrlicht to make. Hmmm..B@z wrote:well, it doesn't work with loop mode, but...
you can do this
if (node->getFrameNr() == node->getEndFrame())
{
node->setFrameLoop(node->getStartFrame(), node->getEndFrame());
// and doing the thingy you need to do at the end of animation
}
Ride the Spiral Development:
spiralride.blogspot.com
spiralride.blogspot.com