Hi Jose,

The time value used in the animation will be
(SimulationTime-Offset)*Multiplier, so if you change the Multipler and
want the position for the current SimilationTime to stay the same
you'll need to adjust the Offset, the maths will be:

(SimulationTime-OffsetCurrent)*MultipleCurrent  =
(SimulationTime-OffsetNew)*MultpleNew

OffsetNew = SimulationTime -
(SimulationTime-OffsetCurrent)*MultipleCurrent/MultiplierNew

Does this make sense?
Robert.


On 2 May 2013 10:39, Jose Manuel Monsalve Diaz <[email protected]> wrote:
> Hi, :D
>
> I want to create some control buttons for the animationPath. I've been trying 
> with the Time offset and time multiplier, but i can't understand how these 
> values actually work. Now, i'm able to speed up and play backwards the 
> animation. The problem is when i change the multiplier, the current control 
> point jump to another part of the animation. I would like to play backwards 
> or speed up the animation from the current control point.
>
> I found in the forum that saving the animationTime, and using it in the 
> Offset time value work for these, but it doesn't
>
> animationTime = apcb->getAnimationTime();
> apcb->setTimeMultiplier(multiplier);
> apcb->setTimeOffset(animationTime);
>
> Any idea how can i keep the current frame?
> ...
>
> Thank you very much!
>
> Cheers,
> Jose :D
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=53891#53891
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to