group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
Movement.hpp File Reference

Pure physics math for velocity, friction, and acceleration. More...

#include <glm/vec3.hpp>
Include dependency graph for Movement.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  physics
 Pure physics math — no ECS types, no registry.
 

Functions

glm::vec3 physics::applyGravity (glm::vec3 vel, float dt)
 Apply gravity for one tick: subtracts k_gravity * dt from the Y component.
 
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.
 
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.
 

Detailed Description

Pure physics math for velocity, friction, and acceleration.