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

All physics tuning constants in one place. More...

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.

Variables

constexpr float physics::k_gravity = 1000.0f
 Downward acceleration (units/s^2) for projectiles / dynamics.
constexpr float physics::k_playerGravity
 Player-specific gravity (units/s^2).
constexpr float physics::k_jumpSpeed = 660.0f
 Initial upward velocity on jump (units/s).
constexpr float physics::k_groundAccel = 10.0f
 Ground acceleration constant. Higher = reaches max speed faster.
constexpr float physics::k_airAccel
 Air acceleration constant. Higher than Quake (0.7) for Titanfall-style air control.
constexpr float physics::k_airMaxSpeed = 30.0f
 Wish-speed FLOOR in air (units/s).
constexpr float physics::k_airMaxWishLowSpeed = 120.0f
 Wish-speed CEILING in air (units/s) when stationary.
constexpr float physics::k_airWishCurveTop = 250.0f
 Horizontal speed (u/s) at which the curve plateaus at k_airMaxSpeed.
constexpr float physics::k_airWishCurveExponent = 0.4f
 Power-curve exponent for wish-speed falloff (<1 = sharp early drop).
constexpr float physics::k_friction = 7.5f
 Ground friction coefficient. Higher = crisper stops, easier-to-track movement.
constexpr float physics::k_stopSpeed = 150.0f
 Friction is amplified below this speed for a crisp stop.
constexpr float physics::k_overbounceWall = 1.001f
 Separation impulse for walls/ceilings; prevents corner-sticking.
constexpr float physics::k_overbounceFloor = 1.0f
 Floor overbounce — exactly 1.0 means no bounce.
constexpr float physics::k_stepHeight = 18.0f
 Maximum obstacle height auto-stepped over without jumping (units).
constexpr float physics::k_floorAngleCos = 0.7f
 dot(surfaceNormal, up) threshold above which a surface counts as walkable floor.
constexpr float physics::k_groundSnapDistance = 8.0f
 Distance the ground probe extends below the capsule foot to snap to descending slopes / steps.
constexpr float physics::k_emergencyUnstickRadius = 64.0f
 Maximum radius of the emergency-unstick free-space search.
constexpr int physics::k_maxDepenPasses = 6
 Maximum sequential passes the deepest-first capsule depen attempts before falling through to emergency unstick.
constexpr float physics::k_gravityFlipCooldown = 0.5f
 Minimum time between gravity flips (s).
constexpr bool physics::k_enableSubstepping = true
 Master toggle for Phase-C sub-stepping.
constexpr float physics::k_substepSafetyRatio = 0.5f
 Sub-step when |v|·dt > min_shape_radius · this.
constexpr int physics::k_maxSubsteps = 8
 Clamp on sub-step count to bound worst-case cost.

Detailed Description

All physics tuning constants in one place.