23#include <glm/vec2.hpp>
24#include <glm/vec3.hpp>
Per-tick collision feedback emitted by the player KCC.
Visible / replicated half of the player locomotion state.
Triangle-mesh collision with BVH acceleration and seam welding.
TriRegion
Voronoi region of a triangle.
Definition TriMeshCollision.hpp:27
@ Face
Definition TriMeshCollision.hpp:28
Read-only counterpart of PlayerStateRef, for const consumers.
Definition PlayerSimState.hpp:139
const PlayerSimState & sim
Definition PlayerSimState.hpp:141
const PlayerVisState & vis
Definition PlayerSimState.hpp:140
Server-only locomotion bookkeeping.
Definition PlayerSimState.hpp:32
float exitWallTimer
Remaining exit-wall grace time (s).
Definition PlayerSimState.hpp:66
float wallRunTimer
Time on current wall (s).
Definition PlayerSimState.hpp:64
uint32_t wallCornerMeshIndex
Pending wall mesh after corner clearance.
Definition PlayerSimState.hpp:77
physics::TriRegion wallCornerRegion
Pending wall feature after clearance.
Definition PlayerSimState.hpp:79
bool wallAttachmentValid
True while the wallrun has a collision-backed attachment.
Definition PlayerSimState.hpp:70
bool canEnterSlide
Cleared when in air, set on landing.
Definition PlayerSimState.hpp:58
bool kccPreviousFrameValid
True once previous KCC frame fields are initialized.
Definition PlayerSimState.hpp:96
bool wasGroundedLastTick
Definition PlayerSimState.hpp:43
bool jumpHeldLastTick
Was jump key held on the previous tick (edge detection).
Definition PlayerSimState.hpp:38
int wallrunBlockedFrames
Consecutive frames constrained by the active blocker.
Definition PlayerSimState.hpp:86
bool canDoubleJump
Refreshed only after k_doubleJumpGroundedRefreshTime of continuous grounded OnFoot time.
Definition PlayerSimState.hpp:34
glm::vec3 wallCornerToForward
Pending wall tangent to use after clearance.
Definition PlayerSimState.hpp:76
uint32_t wallMeshIndex
Current static collision mesh under the wall attachment, if any.
Definition PlayerSimState.hpp:67
glm::vec3 wallrunBlockerNormal
Collision normal of the active wallrun blocker.
Definition PlayerSimState.hpp:84
bool jumpLurchEnabled
True during the lurch grace window after jumping.
Definition PlayerSimState.hpp:49
float wallBlacklistHeight
Definition PlayerSimState.hpp:101
int slideFatigueDecayAccum
Tick accumulator for fatigue recovery.
Definition PlayerSimState.hpp:57
physics::KccFrameResult lastKccResult
Last collision feedback frame emitted by KCC.
Definition PlayerSimState.hpp:91
float jumpCooldown
Minimum time before double jump is available (s).
Definition PlayerSimState.hpp:39
glm::vec3 kccPreviousPosBefore
Previous KCC input position for oscillation detection.
Definition PlayerSimState.hpp:93
int slideFatigueCounter
Diminishing returns on consecutive slidehops.
Definition PlayerSimState.hpp:55
int kccOscillationFrames
Consecutive ABAB-style KCC oscillation detections.
Definition PlayerSimState.hpp:97
bool lastSafePositionValid
Definition PlayerSimState.hpp:106
float wallrunCeilingConstrainedTimer
Short grace after head/ceiling contact while wallrun remains valid.
Definition PlayerSimState.hpp:87
glm::vec3 wallCornerAnchor
Corner/seam point used as the transition clearance origin.
Definition PlayerSimState.hpp:72
uint32_t wallTriId
Current mesh triangle under the wall attachment, if any.
Definition PlayerSimState.hpp:68
glm::vec3 wallNormal
Normal of the wall being run on.
Definition PlayerSimState.hpp:61
float slideTimer
How long the current slide has lasted (s).
Definition PlayerSimState.hpp:54
bool wallBlacklistActive
Definition PlayerSimState.hpp:102
bool jumpedThisTick
Set during the tick a jump occurs (for lurch setup).
Definition PlayerSimState.hpp:37
glm::vec3 wallAnchor
Closest point on the attached wall surface.
Definition PlayerSimState.hpp:63
glm::vec3 kccPreviousDepenDelta
Previous depenetration push for oscillation detection.
Definition PlayerSimState.hpp:95
glm::vec3 wallCornerFromForward
Old wall tangent held during the corner approach.
Definition PlayerSimState.hpp:74
float wallCornerIgnoreTimer
Remaining time to suppress source-wall backtracking.
Definition PlayerSimState.hpp:82
glm::vec3 pendingKccCorrection
One-tick collision-owned correction requested by movement.
Definition PlayerSimState.hpp:89
float jumpLurchTimer
Time elapsed since the jump that enabled lurch (s).
Definition PlayerSimState.hpp:50
float groundedDuration
Time continuously grounded (s); resets on leaving ground.
Definition PlayerSimState.hpp:44
float wallrunBlockerTimer
Time since the blocker was last confirmed by KCC.
Definition PlayerSimState.hpp:85
float grapplePullTimer
Time spent being pulled (s).
Definition PlayerSimState.hpp:111
float wallCornerTimer
Time spent in the active corner transition (s).
Definition PlayerSimState.hpp:80
glm::vec3 wallCornerIgnoreNormal
Source wall briefly ignored after a corner commit.
Definition PlayerSimState.hpp:81
uint32_t wallCornerTriId
Pending wall triangle after corner clearance.
Definition PlayerSimState.hpp:78
glm::vec3 lastSafePosition
Last KCC-verified non-penetrating capsule center.
Definition PlayerSimState.hpp:105
glm::vec3 wallBlacklistNormal
Definition PlayerSimState.hpp:100
glm::vec3 kccPreviousPosAfter
Previous KCC output position for oscillation detection.
Definition PlayerSimState.hpp:94
glm::vec3 grapplePullDir
Cached pull direction (toward anchor at fire time).
Definition PlayerSimState.hpp:112
bool grappleInputLastTick
Edge detection on the grapple key.
Definition PlayerSimState.hpp:113
physics::TriRegion wallRegion
Closest feature on wallMeshIndex / wallTriId.
Definition PlayerSimState.hpp:69
float slideBoostCooldown
Remaining cooldown before next slide boost (s).
Definition PlayerSimState.hpp:56
bool wallCornerTransitionActive
True while carrying a pending external-corner handoff.
Definition PlayerSimState.hpp:71
glm::vec2 moveInputsOnJump
WASD direction when jump started (for direction-change detection).
Definition PlayerSimState.hpp:51
bool wasWallRunning
Set briefly after leaving wallrun (coyote wall jump).
Definition PlayerSimState.hpp:88
float wallRunSpeedTimer
Timer for the speed-loss delay.
Definition PlayerSimState.hpp:65
glm::vec3 wallCornerToNormal
Pending wall normal to attach after clearance.
Definition PlayerSimState.hpp:75
glm::vec3 wallForward
Direction of travel along the wall.
Definition PlayerSimState.hpp:62
bool hasLastKccResult
True after the first KCC frame has been recorded.
Definition PlayerSimState.hpp:92
float coyoteTimer
Remaining grace time after leaving ground/wall (s).
Definition PlayerSimState.hpp:42
bool wallrunBlockerActive
True while collision is sliding/holding against a non-traversable blocker.
Definition PlayerSimState.hpp:83
glm::vec3 wallCornerFromNormal
Wall normal held until the capsule clears the old wall edge.
Definition PlayerSimState.hpp:73
bool grappleCooldownActive
True during cooldown between uses.
Definition PlayerSimState.hpp:109
float grappleCooldownTimer
Remaining cooldown time (s).
Definition PlayerSimState.hpp:110
Combined-reference helper for code that needs both halves.
Definition PlayerSimState.hpp:132
PlayerSimState & sim
Definition PlayerSimState.hpp:134
PlayerVisState & vis
Definition PlayerSimState.hpp:133
Replicated subset of player locomotion state.
Definition PlayerVisState.hpp:39
Collision-owned result for one player KCC step.
Definition KccFrameResult.hpp:16