group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
PhysicsConstants.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
13namespace physics
14{
15
16// Gravity & jumping
17constexpr float k_gravity = 1000.0f;
18constexpr float k_jumpSpeed = 380.0f;
19
20// Ground movement
21// Ground wish speed is stance-dependent — see tms::k_walkSpeed / k_sprintSpeed / k_crouchSpeed
22// and systems::currentWishSpeed() which selects between them.
23constexpr float k_groundAccel = 15.0f;
24
25// Air movement
26constexpr float k_airAccel =
27 2000.0f;
28constexpr float k_airMaxSpeed =
29 30.0f;
30
31// Friction
32constexpr float k_friction = 4.0f;
33constexpr float k_stopSpeed = 150.0f;
34
35// Collision
36constexpr float k_overbounceWall = 1.001f;
37constexpr float k_overbounceFloor = 1.0f;
38
39// Geometry
40constexpr float k_stepHeight = 18.0f;
41
42} // namespace physics
Pure physics math — no ECS types, no registry.
Definition Movement.cpp:14
constexpr float k_stopSpeed
Friction is amplified below this speed for a crisp stop.
Definition PhysicsConstants.hpp:33
constexpr float k_groundAccel
Ground acceleration constant. Higher = reaches max speed faster.
Definition PhysicsConstants.hpp:23
constexpr float k_stepHeight
Maximum obstacle height auto-stepped over without jumping (units).
Definition PhysicsConstants.hpp:40
constexpr float k_gravity
Downward acceleration (units/s^2). Faster than real-world for snappy arcs.
Definition PhysicsConstants.hpp:17
constexpr float k_airMaxSpeed
Wish-speed cap in air (units/s). Does NOT cap total speed — existing momentum is preserved.
Definition PhysicsConstants.hpp:28
constexpr float k_airAccel
Air acceleration constant. Higher than Quake (0.7) for Titanfall-style air control.
Definition PhysicsConstants.hpp:26
constexpr float k_overbounceWall
Separation impulse for walls/ceilings; prevents corner-sticking.
Definition PhysicsConstants.hpp:36
constexpr float k_jumpSpeed
Initial upward velocity on jump (units/s). Gives apex ~ 72 units (~6 ft).
Definition PhysicsConstants.hpp:18
constexpr float k_overbounceFloor
Floor overbounce — exactly 1.0 means no bounce.
Definition PhysicsConstants.hpp:37
constexpr float k_friction
Ground friction coefficient (Quake default).
Definition PhysicsConstants.hpp:32