mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
Fixed zoom, changed camera shaking parameters
This commit is contained in:
parent
cdc8a26a30
commit
1dd9a72fb3
4 changed files with 38 additions and 16 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue