J :
* Animation smoothing (and bugfix on slow machines).
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
Pos::Pos(float x, float y, float z, float t, float a) : actX(x), actY(y), actZ(z), actT(t), actA(a), x(x), y(y), zoom(z), t(t), alpha(a) {}
|
Pos::Pos(float x, float y, float z, float t, float a) : actX(x), actY(y), actZ(z), actT(t), actA(a), x(x), y(y), zoom(z), t(t), alpha(a) {}
|
||||||
void Pos::Update(float dt)
|
void Pos::Update(float dt)
|
||||||
{
|
{
|
||||||
|
if (dt > 0.05) dt = 0.05;
|
||||||
actX += 10 * dt * (x - actX);
|
actX += 10 * dt * (x - actX);
|
||||||
actY += 10 * dt * (y - actY);
|
actY += 10 * dt * (y - actY);
|
||||||
actT += 10 * dt * (t - actT);
|
actT += 10 * dt * (t - actT);
|
||||||
|
|||||||
Reference in New Issue
Block a user