Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions include/physics.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
#include <math.h>

// Tunable constants
#define PHYS_GRAVITY -0.1f
#define PHYS_TERMINAL_VELOCITY -10.0f
#define PHYS_GRAVITY -0.01f // ok
#define PHYS_TERMINAL_VELOCITY -20.0f
#define PHYS_GROUND_FRICTION 0.96f
#define PHYS_AIR_FRICTION 0.985f
#define PHYS_MAX_AIR_SPEED 4.0f
#define PHYS_SLOPE_SLIDE_FACTOR 0.05f
#define PHYS_AIR_FRICTION 3.985f
#define PHYS_MAX_AIR_SPEED 1.0f
#define PHYS_SLOPE_SLIDE_FACTOR 0.03f

void physics_apply(Entity *self, Uint8 onGround, Uint8 ignoreGravity);
void physics_apply_slope(Entity *self, GFC_Vector3D groundNormal, Uint8 onGround);
Expand Down
6 changes: 3 additions & 3 deletions src/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
#include "world.h"

// Constants
#define PLAYER_RADIUS 1.0f
#define PLAYER_RADIUS 2.0f
#define DOWN_RAY_ABOVE 1.0f
#define DOWN_RAY_BELOW 2.0f
#define PENETRATION_TOLERANCE 0.05f
#define REST_TOLERANCE 0.02f

#define JUMP_STRENGTH 2.0f
#define MOVE_SPEED 0.5f
#define JUMP_STRENGTH 0.5f
#define MOVE_SPEED 0.0001f

static Entity* thePlayer;

Expand Down