fix: player step height

This commit is contained in:
MihailRis 2024-06-10 19:20:26 +03:00
parent f6de40ca88
commit 779d44b034

View File

@ -45,7 +45,7 @@ void PhysicsSolver::step(
vel.z *= glm::max(0.0f, 1.0f - dt * linear_damping);
pos += vel * dt + gravity * gravityScale * dt * dt * 0.5f;
if (hitbox->grounded) {
if (hitbox->grounded && pos.y < py) {
pos.y = py;
}