mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-01 00:10:19 +01:00
feat: justice for z (#2056)
This commit is contained in:
parent
f034296f28
commit
621f38c6a3
@ -56,8 +56,9 @@ public final class PhysicsUtils {
|
||||
double gravity = entityFlying ? 0 : aerodynamics.gravity();
|
||||
double gravityDrag = entityFlying ? 0.6 : aerodynamics.verticalAirResistance();
|
||||
|
||||
double x = currentVelocity.x() * drag, z = currentVelocity.z() * drag;
|
||||
double y = !entityNoGravity ? ((currentVelocity.y() - gravity) * gravityDrag) : currentVelocity.y();
|
||||
double x = currentVelocity.x() * drag;
|
||||
double y = entityNoGravity ? currentVelocity.y() : (currentVelocity.y() - gravity) * gravityDrag;
|
||||
double z = currentVelocity.z() * drag;
|
||||
return new Vec(Math.abs(x) < Vec.EPSILON ? 0 : x, Math.abs(y) < Vec.EPSILON ? 0 : y, Math.abs(z) < Vec.EPSILON ? 0 : z);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user