|
group2 0.1.0
CSE 125 Group 2
|
Pure physics math for velocity, friction, and acceleration. More...
#include <glm/vec3.hpp>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, bool flipped=false) |
| Apply gravity for one tick. | |
| glm::vec3 | physics::applyPlayerGravity (glm::vec3 vel, float dt, bool flipped=false) |
| Apply the player's gravity for one tick (k_playerGravity). | |
| 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. | |
Pure physics math for velocity, friction, and acceleration.