adjust wind variation formula
parent
da4062c30e
commit
60de61552e
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue