From 60de61552ed28af0faf1d102f83ec06230f290ac Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Fri, 1 Oct 2021 11:37:42 -0700 Subject: [PATCH] adjust wind variation formula --- src/Silkworm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Silkworm.c b/src/Silkworm.c index 52d2fac..90d51e0 100644 --- a/src/Silkworm.c +++ b/src/Silkworm.c @@ -1156,8 +1156,8 @@ void Silkworm_ApplyWind(double xSpeed, double ySpeed) if (node != NULL && !node->pinned) { - node->position.x += (0.5f * sinf(context->timeElapsed / 15 + node->position.y / 2) + 0.5f) * (float)xSpeed * 0.05f * node->windFactor; - node->position.y += (0.5f * sinf(context->timeElapsed / 15 + node->position.x / 3) + 0.5f) * (float)ySpeed * 0.05f * node->windFactor; + node->position.x += (0.5f * sinf(context->timeElapsed * 4 + node->position.y / 2) + 0.5f) * (float)xSpeed * 0.05f * node->windFactor; + node->position.y += (0.5f * sinf(context->timeElapsed * 4 + node->position.x / 3) + 0.5f) * (float)ySpeed * 0.05f * node->windFactor; } } }