mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 19:04:32 +02:00
Moved gravity influence multiplier into constant, reduced.
This commit is contained in:
parent
021dce72be
commit
b502321b57
1 changed files with 2 additions and 1 deletions
|
@ -71,7 +71,8 @@ glm::vec3 Environment::getGravity (const glm::vec3& position) {
|
|||
foreach (const ServerData& serverData, _data) {
|
||||
foreach (const EnvironmentData& environmentData, serverData) {
|
||||
glm::vec3 vector = environmentData.getAtmosphereCenter() - position;
|
||||
if (glm::length(vector) < environmentData.getAtmosphereOuterRadius() * 2.0f) {
|
||||
const float GRAVITY_RADIUS_MULTIPLIER = 1.5f;
|
||||
if (glm::length(vector) < environmentData.getAtmosphereOuterRadius() * GRAVITY_RADIUS_MULTIPLIER) {
|
||||
gravity += glm::normalize(vector) * environmentData.getGravity();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue