#ifndef ENGINE_PHYSIC_H
# define ENGINE_PHYSIC_H

#pragma once

#include "vector_math.h"

#define GROUND_Y 0.0f
#define GRAVITY -9.81f
#define PLAYER_JUMP_VELOCITY 8.0f
#define PLAYER_WALK_SPEED 5.0f
#define PLAYER_SPRINT_SPEED 8.5f

Vector3 apply_gravity(Vector3 velocity, float delta);
Vector3 apply_friction(Vector3 velocity, float delta, bool grounded);
Vector3 ground_accelerate(Vector3 velocity, Vector3 wishDir, float wishSpeed, float delta);
Vector3 air_accelerate(Vector3 velocity, Vector3 wishDir, float wishSpeed, float delta);
Vector3 calculate_wish_direction(InputState *input, float yaw);

#endif
