|
group2 0.1.0
CSE 125 Group 2
|
Implementation of Quake-style movement physics functions. More...
#include "Movement.hpp"#include "PhysicsConstants.hpp"#include <algorithm>#include <cmath>#include <glm/geometric.hpp>#include <glm/trigonometric.hpp>Namespaces | |
| namespace | physics |
| Pure physics math — no ECS types, no registry. | |
Functions | |
| glm::vec3 | physics::applyGravity (glm::vec3 vel, float dt, bool flipped=false) |
| Apply gravity for one tick. | |
| glm::vec3 | physics::applyGroundFriction (glm::vec3 vel, float dt) |
| Apply Quake-style ground friction to horizontal (XZ) velocity. | |
| glm::vec3 | physics::accelerate (glm::vec3 vel, glm::vec3 wishDir, float wishSpeed, float accel, float dt) |
| Quake PM_Accelerate: accelerate toward wishDir up to wishSpeed. | |
| float | physics::airWishSpeedForHorizSpeed (float currentHorizSpeed) |
| Compute the air wish-speed for the player's current horizontal speed. | |
| glm::vec3 | physics::clipVelocity (glm::vec3 vel, glm::vec3 normal, float overbounce) |
| Project velocity onto a collision surface to slide along it. | |
| glm::vec3 | physics::computeWishDir (float yaw, bool forward, bool back, bool left, bool right) |
| Compute the horizontal wish direction from yaw angle and WASD key state. | |
Implementation of Quake-style movement physics functions.