|
group2 0.1.0
CSE 125 Group 2
|
Titanfall-inspired movement constants, adapted to Quake units. More...
Variables | |
| constexpr float | k_walkSpeed = 320.0f |
| Max wish speed when walking (u/s). | |
| constexpr float | k_sprintSpeed = 530.0f |
| Max wish speed when sprinting (u/s). | |
| constexpr float | k_crouchSpeed = 200.0f |
| Max wish speed when crouching (u/s). | |
| constexpr float | k_jumpSpeed = 380.0f |
| Upward velocity on ground jump (u/s). | |
| constexpr float | k_doubleJumpSpeed = 340.0f |
| Upward velocity on air jump (u/s). | |
| constexpr float | k_slidehopJumpSpeed = 280.0f |
| Upward velocity when jumping during slide (u/s). | |
| constexpr float | k_doubleJumpCooldown = 0.10f |
| Min time after first jump before double jump is allowed (s). | |
| constexpr float | k_coyoteTime = 0.15f |
| Grace period after leaving ground/wall to still jump (s). | |
| constexpr int | k_enableJumpLurch = 1 |
| Master enable for jump lurch (1 = enabled, 0 = disabled). | |
| constexpr float | k_jumpLurchMinGroundedTime = 0.3f |
| Min continuous grounded time before a ground jump re-arms lurch (s). | |
| constexpr float | k_jumpLurchGraceMin = 0.2f |
| Time after jump where lurch is at max strength (s). | |
| constexpr float | k_jumpLurchGraceMax = 0.5f |
| Time after jump where lurch is disabled entirely (s). | |
| constexpr float | k_jumpLurchStrength = 5.0f |
| Multiplier for lurch intensity. | |
| constexpr float | k_jumpLurchMax = 180.0f |
| Maximum lurch velocity magnitude (u/s). | |
| constexpr float | k_jumpLurchBaseVelocity = 60.0f |
| Base lurch velocity before scaling (u/s). | |
| constexpr float | k_jumpLurchSpeedLoss = 0.125f |
| Fraction of speed lost on lurch (12.5%). | |
| constexpr float | k_slideMinStartSpeed = 400.0f |
| Min horizontal speed to enter slide (u/s). | |
| constexpr float | k_slideMinSpeed = 100.0f |
| Slide cancels below this speed (u/s). | |
| constexpr float | k_slideBoostMin = 80.0f |
| Min speed boost on slide entry (u/s). | |
| constexpr float | k_slideBoostMax = 200.0f |
| Max speed boost on slide entry (u/s). | |
| constexpr float | k_slideBoostCooldown = 2.0f |
| Cooldown between slide boosts (s). | |
| constexpr float | k_slideBrakingDecelMin = 200.0f |
| Initial braking deceleration (u/s^2). | |
| constexpr float | k_slideBrakingDecelMax = 400.0f |
| Maximum braking deceleration (u/s^2). | |
| constexpr float | k_slideBrakingRampTime = 3.0f |
| Time to ramp from min to max braking (s). | |
| constexpr float | k_slideFloorInfluenceForce = 400.0f |
| How much slope angle affects slide speed (u/s^2). | |
| constexpr int | k_slideFatigueDecayTicks = 384 |
| Ticks (at 128Hz = 3s) to reset one fatigue level. | |
| constexpr int | k_slideFatigueMax = 4 |
| Max fatigue levels (boost fully killed at this). | |
| constexpr float | k_wallrunCheckDist = 35.0f |
| Sphere-cast distance for side walls (u). | |
| constexpr float | k_wallrunSphereRadius = 12.0f |
| Sphere-cast radius for wall detection (u). | |
| constexpr float | k_wallrunMinGroundDist = 50.0f |
| Min height above ground to wallrun (u). | |
| constexpr float | k_wallrunMaxSpeed = 630.0f |
| Max speed while wallrunning (u/s). | |
| constexpr float | k_wallrunAccel = 800.0f |
| Forward acceleration along wall (u/s^2). | |
| constexpr float | k_wallrunPushForce = 300.0f |
| Force pushing player toward wall (u/s^2). | |
| constexpr float | k_wallrunKickoffDuration = 1.75f |
| Max time on same wall before kickoff (s). | |
| constexpr float | k_wallrunSpeedLossDelay = 0.1f |
| Delay before clamping speed on wall (s). | |
| constexpr float | k_wallrunIntentThreshold = 0.1f |
| Min dot(wishDir, -wallNormal) to enter/maintain a wallrun. | |
| constexpr float | k_wallrunGripTime = 0.5f |
| Initial zero-gravity "grip" phase on a wall (s). | |
| constexpr float | k_wallrunGravityRampTime = 1.0f |
| Time to ramp gravity 0 → full after grip ends (s). | |
| constexpr float | k_wallJumpUpForce = 320.0f |
| Upward velocity on wall jump (u/s). | |
| constexpr float | k_wallJumpSideForce = 350.0f |
| Sideways velocity on wall jump (away from wall) (u/s). | |
| constexpr float | k_wallrunExitTime = 0.2f |
| Duration of "exiting wall" flag after leaving (s). | |
| constexpr float | k_wallrunCameraTilt = 7.5f |
| Camera roll when wallrunning (degrees). | |
| constexpr float | k_wallrunCameraTiltSpeed = 10.0f |
| Interpolation speed for camera tilt. | |
| constexpr float | k_climbCheckDist = 35.0f |
| Forward sphere-cast distance (u). | |
| constexpr float | k_climbSphereRadius = 12.0f |
| Sphere-cast radius for climb detection (u). | |
| constexpr float | k_climbMaxSpeed = 280.0f |
| Max upward climbing speed (u/s). | |
| constexpr float | k_climbMinSpeed = 180.0f |
| Min climbing speed (after decay) (u/s). | |
| constexpr float | k_climbKickoffDuration = 1.5f |
| Max climb time on same wall (s). | |
| constexpr float | k_climbMaxWallLookAngle = 30.0f |
| Max angle (degrees) between look dir and wall normal. | |
| constexpr float | k_climbSidewaysMultiplier = 0.1f |
| Sideways movement reduction while climbing. | |
| constexpr float | k_climbJumpUpForce = 320.0f |
| Upward velocity on climb jump (u/s). | |
| constexpr float | k_climbJumpBackForce = 350.0f |
| Backward velocity on climb jump (u/s). | |
| constexpr float | k_climbMinGroundDist = 40.0f |
| Min height above ground to start climbing (u). | |
| constexpr float | k_climbExitTime = 0.5f |
| Duration of "exiting climb" flag (s). | |
| constexpr float | k_climbRegrabLowerHeight = 400.0f |
| Must be this much lower to regrab same wall (u). | |
| constexpr float | k_ledgeCheckDist = 35.0f |
| Forward trace distance for ledge detection (u). | |
| constexpr float | k_ledgeSphereRadius = 12.0f |
| Sphere-cast radius for ledge traces (u). | |
| constexpr float | k_ledgeMaxGrabDist = 35.0f |
| Max distance from ledge surface to grab (u). | |
| constexpr float | k_ledgeMinHoldTime = 0.5f |
| Min time frozen on ledge before release (s). | |
| constexpr float | k_ledgeMoveAccel = 800.0f |
| Acceleration pulling player toward ledge (u/s^2). | |
| constexpr float | k_ledgeMaxSpeed = 400.0f |
| Max speed of pull toward ledge (u/s). | |
| constexpr float | k_ledgeJumpUpForce = 380.0f |
| Upward velocity on ledge jump / mantle (u/s). | |
| constexpr float | k_ledgeJumpBackForce = 120.0f |
| Backward velocity on ledge jump (u/s). | |
| constexpr float | k_ledgeExitTime = 0.5f |
| Duration of "exiting ledge" flag (s). | |
| constexpr float | k_speedCap = 7000.0f |
| Hard horizontal speed limit (u/s). | |
| constexpr float | k_standingHalfHeight = 36.0f |
| Standing AABB half-height (u). | |
| constexpr float | k_crouchingHalfHeight = 22.0f |
| Crouching/sliding AABB half-height (u). | |
| constexpr float | k_grappleMaxRange = 800.0f |
| Max hook distance (~20 m in Quake units). | |
| constexpr float | k_grapplePullSpeed = 800.0f |
| Direct velocity toward anchor (u/s). Overrides, not additive. | |
| constexpr float | k_grappleDetachDist = 80.0f |
| Auto-detach when this close to anchor (~2 m). | |
| constexpr float | k_grappleMaxDuration = 5.0f |
| Safety timeout (s). | |
| constexpr float | k_grappleCooldown = 6.0f |
| Cooldown between grapples (s). | |
| constexpr float | k_grappleLaunchLookBias |
| Look-direction weight on detach launch (0 = pure grapple dir, 1 = pure look). | |
| constexpr float | k_grappleLaunchSpeedMult = 1.15f |
| Speed multiplier on launch (slight boost for momentum). | |
Titanfall-inspired movement constants, adapted to Quake units.
All speeds in units/second, distances in units, times in seconds. Tuned to replicate the TMS (Titanfall Movement System) feel within our custom swept-AABB engine at 128 Hz physics.
See docs/titanfall-movement-design.md for conversion rationale.
|
constexpr |
Forward sphere-cast distance (u).
|
constexpr |
Duration of "exiting climb" flag (s).
|
constexpr |
Backward velocity on climb jump (u/s).
|
constexpr |
Upward velocity on climb jump (u/s).
|
constexpr |
Max climb time on same wall (s).
|
constexpr |
Max upward climbing speed (u/s).
|
constexpr |
Max angle (degrees) between look dir and wall normal.
|
constexpr |
Min height above ground to start climbing (u).
|
constexpr |
Min climbing speed (after decay) (u/s).
|
constexpr |
Must be this much lower to regrab same wall (u).
|
constexpr |
Sideways movement reduction while climbing.
|
constexpr |
Sphere-cast radius for climb detection (u).
|
constexpr |
Grace period after leaving ground/wall to still jump (s).
|
constexpr |
Crouching/sliding AABB half-height (u).
|
constexpr |
Max wish speed when crouching (u/s).
|
constexpr |
Min time after first jump before double jump is allowed (s).
|
constexpr |
Upward velocity on air jump (u/s).
|
constexpr |
Master enable for jump lurch (1 = enabled, 0 = disabled).
|
constexpr |
Cooldown between grapples (s).
|
constexpr |
Auto-detach when this close to anchor (~2 m).
|
constexpr |
Look-direction weight on detach launch (0 = pure grapple dir, 1 = pure look).
|
constexpr |
Speed multiplier on launch (slight boost for momentum).
|
constexpr |
Safety timeout (s).
|
constexpr |
Max hook distance (~20 m in Quake units).
|
constexpr |
Direct velocity toward anchor (u/s). Overrides, not additive.
|
constexpr |
Base lurch velocity before scaling (u/s).
|
constexpr |
Time after jump where lurch is disabled entirely (s).
|
constexpr |
Time after jump where lurch is at max strength (s).
|
constexpr |
Maximum lurch velocity magnitude (u/s).
|
constexpr |
Min continuous grounded time before a ground jump re-arms lurch (s).
Prevents lurch from firing on bhop-chain jumps where the player only touches the ground for 1-2 ticks between hops.
|
constexpr |
Fraction of speed lost on lurch (12.5%).
|
constexpr |
Multiplier for lurch intensity.
|
constexpr |
Upward velocity on ground jump (u/s).
|
constexpr |
Forward trace distance for ledge detection (u).
|
constexpr |
Duration of "exiting ledge" flag (s).
|
constexpr |
Backward velocity on ledge jump (u/s).
|
constexpr |
Upward velocity on ledge jump / mantle (u/s).
|
constexpr |
Max distance from ledge surface to grab (u).
|
constexpr |
Max speed of pull toward ledge (u/s).
|
constexpr |
Min time frozen on ledge before release (s).
|
constexpr |
Acceleration pulling player toward ledge (u/s^2).
|
constexpr |
Sphere-cast radius for ledge traces (u).
|
constexpr |
Cooldown between slide boosts (s).
|
constexpr |
Max speed boost on slide entry (u/s).
|
constexpr |
Min speed boost on slide entry (u/s).
|
constexpr |
Maximum braking deceleration (u/s^2).
|
constexpr |
Initial braking deceleration (u/s^2).
|
constexpr |
Time to ramp from min to max braking (s).
|
constexpr |
Ticks (at 128Hz = 3s) to reset one fatigue level.
|
constexpr |
Max fatigue levels (boost fully killed at this).
|
constexpr |
How much slope angle affects slide speed (u/s^2).
|
constexpr |
Upward velocity when jumping during slide (u/s).
|
constexpr |
Slide cancels below this speed (u/s).
|
constexpr |
Min horizontal speed to enter slide (u/s).
|
constexpr |
Hard horizontal speed limit (u/s).
|
constexpr |
Max wish speed when sprinting (u/s).
|
constexpr |
Standing AABB half-height (u).
|
constexpr |
Max wish speed when walking (u/s).
|
constexpr |
Sideways velocity on wall jump (away from wall) (u/s).
|
constexpr |
Upward velocity on wall jump (u/s).
|
constexpr |
Forward acceleration along wall (u/s^2).
|
constexpr |
Camera roll when wallrunning (degrees).
|
constexpr |
Interpolation speed for camera tilt.
|
constexpr |
Sphere-cast distance for side walls (u).
|
constexpr |
Duration of "exiting wall" flag after leaving (s).
|
constexpr |
Time to ramp gravity 0 → full after grip ends (s).
Produces a natural slide-off so the player can't wallrun indefinitely even before the hard kickoff.
|
constexpr |
Initial zero-gravity "grip" phase on a wall (s).
During this window the player is pinned (vel.y = 0); after it, gravity leaks in gradually.
|
constexpr |
Min dot(wishDir, -wallNormal) to enter/maintain a wallrun.
Rotation-symmetric directional intent — the player's wish direction must have a component pointing into the wall. 0.1 ≈ 84° off-axis tolerance.
|
constexpr |
Max time on same wall before kickoff (s).
|
constexpr |
Max speed while wallrunning (u/s).
|
constexpr |
Min height above ground to wallrun (u).
|
constexpr |
Force pushing player toward wall (u/s^2).
|
constexpr |
Delay before clamping speed on wall (s).
|
constexpr |
Sphere-cast radius for wall detection (u).