Fixed zoom, changed camera shaking parameters

This commit is contained in:
MihailRis 2022-03-04 16:53:55 +03:00 • committed by GitHub
parent cdc8a26a30
commit 1dd9a72fb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 38 additions and 16 deletions

View file

@ -5,6 +5,7 @@
#include <iostream>
#define E 0.03
#define DEFAULT_FRICTION 10.0
PhysicsSolver::PhysicsSolver(vec3 gravity) : gravity(gravity) {
}
@ -83,7 +84,7 @@ void PhysicsSolver::step(Chunks* chunks, Hitbox* hitbox, float delta, unsigned s
if (chunks->isObstacle(x,y,z)){
vel.y *= 0.0;
pos.y = y + 1 + half.y;
int f = 18.0;
int f = DEFAULT_FRICTION;
vel.x *= max(0.0, 1.0 - dt * f);
vel.z *= max(0.0, 1.0 - dt * f);
hitbox->grounded = true;