Hello,
I'm trying to sppeding up/down an animation using AnimationPathCallback. The
idea is to pause/speed/up/down the animation using key strokes, for this I have
a GuiEventHandler derived class and a NodeVisitor derived class. So far I've
playing round with the base clases AnimationPath and A
Code:
float getAnimationTime{return
((_latestTime-_firstTime)-_timeOffset)*_timeMultiplier;}
so you'll have to do math!!
;)
dhhabyc wrote:
> Hello,
>
> I'm trying to sppeding up/down an animation using AnimationPathCallback. The
> idea is to pause/speed/up/down the animation using key str
set _firstframe to 0 to think in animation time base (not in simulation time)
let timemultiplier to 1
and set latesttime to what you want(in animation time base)
then setup
mp3butcher wrote:
>
> Code:
> float getAnimationTime{return
> ((_latestTime-_firstTime)-_timeOffset)*_timeMultiplier;}
>
Hi,
Thank you for your answer mp3butcher.
Regarding the math issue: actually the arithmethic is correct in my code, the
problem, as I found, was that the _latestTime and _fisrtTime in the
AnimationPathCallback won't match the ones provided in AnimationPath, so I
subclassed AnimationPathCallba
Interpreting the sources,( I haven't tested as it's kinda obvious)
the animationtime is (latest - first - offset) * timemul
If you want to control this equation the simplier is to make its variables
constants:
posing timemult=1 offset =0 and first=0 give use animationtime =latest
so have complete
oups I haven't see the latest auto update
So yes you have to subclass to avoid var auto updates
mp3butcher wrote:
> Interpreting the sources,( I haven't tested as it's kinda obvious)
> the animationtime is (latest - first - offset) * timemul
> If you want to control this equation the simplier is
6 matches
Mail list logo