adjust wind variation formula

main
cosmonaut 2021-10-01 11:37:42 -07:00
parent da4062c30e
commit 60de61552e
1 changed files with 2 additions and 2 deletions

View File

@ -1156,8 +1156,8 @@ void Silkworm_ApplyWind(double xSpeed, double ySpeed)
if (node != NULL && !node->pinned) 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.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 / 15 + node->position.x / 3) + 0.5f) * (float)ySpeed * 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;
} }
} }
} }