Skip to content

Commit b42f4df

Browse files
Slow down new animation a bit for low fps
1 parent 50c5afa commit b42f4df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/items/attachment.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -621,9 +621,9 @@ void Attachment::updateGraphics(float dt)
621621
{
622622
const float progress = 1.0f - scale_ratio;
623623

624-
const float x = 0.2f * atan(25.0f * progress - 5.0f) + 0.69f;
624+
const float x = 0.2f * atan(20.0f * progress - 5.0f) + 0.7f;
625625
const float y = x;
626-
const float z = 1.0f - pow(2.0f, -20.f * progress);
626+
const float z = 1.0f - pow(2.0f, -15.f * progress);
627627

628628
m_node->setScale(core::vector3df(x * wanted_node_scale,
629629
y * wanted_node_scale,
@@ -638,7 +638,7 @@ void Attachment::updateGraphics(float dt)
638638
const float x = scale_ratio;
639639

640640
scale_ratio = x <= 0 ? 0 : x >= 1 ? 1
641-
: -pow(2, 10 * x - 10) * sin((x * 10 - 10.75) * c4);
641+
: -pow(2, 8 * x - 8) * sin((x * 8 - 8.75) * c4);
642642
}
643643

644644
float scale = 0.3f * scale_ratio +

0 commit comments

Comments
 (0)