更改动画实体的播放速度
我有一个实体播放动画,该动画在我的世界中以 s = 1
的速度运行。 现在,从我的世界中的特定时间间隔开始,动画可能会减慢速度,这意味着它以 s
的速度播放,其中:0
0
.s
s < 1.
此时间间隔由开始时间 ta
和结束时间 tb
定义。
因此,如果我的世界中的时间达到 ta
,动画的速度就会降低,使其播放速度变慢(就像慢动作效果),而其他一切都保持正常速度。
现在,在这个间隔 ta 和 tb 的某个位置,动画停止播放缓慢并播放得更快 s > 。 1
,这样当时间达到tb
时,它就赶上了世界其他地方。
现在我的问题是,减速后的速度要多快,才能使动画完全跟上?假定:
- 时间间隔
ta
、tb
- 速度因子,即达到
ta
后动画减慢的程度。 ta
和tb
之间的时间,慢速效果停止,快速效果应该启动。
我希望这个问题是可以理解的,如果不能理解,请告诉我。举个例子,请想象一台机器将球扔出一条弧线,然后以恒定的速度沿着地板移动并接住球。我现在的情况是,它首先以较慢的速度移动,但经过一定时间后,它必须提高速度才能接住球。那速度是多少?
I have an entity that plays an animation that runs in my world at speed s = 1
.
Now starting with a specific time interval in my world it is possible for the animation to slow down, which means it plays at a speed s
where: 0 < s < 1
.
This time interval is defined by the starttime ta
and endtime tb
.
So if the time in my world reaches ta
, the animation's speed is reduced so that it plays slower, (like a slow motion effect) while everything else remains at it's usual speed.
Now somewhere in this interval ta and tb
, the animation stops to play slow and plays faster s > 1
, so that when the time reaches tb
, it catches up with the rest of the world.
My question is now, how fast has the speed after the slowing down to be, so that the animation catches up exactly? Given that :
- the timeinterval
ta
,tb
- the speedfactor by how much the animation is slowed, once
ta
is reached. - the time between
ta
andtb
, when the slow-effect is stopped and the fast-effect should be started.
I hope the question is understandable, if not please let me know. As an example, please imagine a machine that throws a ball in an arc, then moves along the floor with a constant speed and catches the ball. My case is now, that it first moves at a slower speed, but after a certain time, it has to increase it's speed so that it can catch the ball. What is that speed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设 tc 是动画应该开始更快播放的点,ss 是较慢的动画速度
新动画速度的公式应该是:
Let's say tc is the point where the animation should start playing faster and ss is the slow animation speed
The formula for the new animation speed should be: