group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
PlayerVisState Struct Reference

Replicated subset of player locomotion state. More...

#include <PlayerVisState.hpp>

Public Attributes

MoveMode moveMode {MoveMode::OnFoot}
 Active locomotion mode.
WallSide wallRunSide {WallSide::None}
 Wall side during WallRunning mode.
int jumpCount {0}
 0 = on ground, 1 = first jump, 2 = double jumped.
bool isDead {false}
 True while the player is dead and waiting to respawn.
bool grounded {false}
 True when touching a floor surface this tick.
bool crouching {false}
 True when crouch input is held.
bool sprinting {false}
 True when sprint is active.
bool pendingUncrouch {false}
 Deferred uncrouch (e.g. after slidehop); applied when safe.
bool exitingWall {false}
 Brief grace window after leaving a wall.
bool exitingClimb {false}
 Brief grace window after leaving a climb.
bool grappleActive {false}
 True while being pulled toward the grapple anchor.
glm::vec3 groundNormal {0.0f, 1.0f, 0.0f}
 Normal of the floor surface for foot orientation.
glm::vec3 grapplePoint {0.0f}
 World-space anchor; renderer draws the cable to here.
float targetCameraTilt {0.0f}
 Target camera roll for wallrun lean (degrees).

Detailed Description

Replicated subset of player locomotion state.

Read by the renderer, animator, HUD, and debug UI on every connected client. Written by the server's MovementSystem / CollisionSystem each physics tick.

Member Data Documentation

◆ crouching

bool PlayerVisState::crouching {false}

True when crouch input is held.

◆ exitingClimb

bool PlayerVisState::exitingClimb {false}

Brief grace window after leaving a climb.

◆ exitingWall

bool PlayerVisState::exitingWall {false}

Brief grace window after leaving a wall.

◆ grappleActive

bool PlayerVisState::grappleActive {false}

True while being pulled toward the grapple anchor.

◆ grapplePoint

glm::vec3 PlayerVisState::grapplePoint {0.0f}

World-space anchor; renderer draws the cable to here.

◆ grounded

bool PlayerVisState::grounded {false}

True when touching a floor surface this tick.

◆ groundNormal

glm::vec3 PlayerVisState::groundNormal {0.0f, 1.0f, 0.0f}

Normal of the floor surface for foot orientation.

◆ isDead

bool PlayerVisState::isDead {false}

True while the player is dead and waiting to respawn.

◆ jumpCount

int PlayerVisState::jumpCount {0}

0 = on ground, 1 = first jump, 2 = double jumped.

◆ moveMode

MoveMode PlayerVisState::moveMode {MoveMode::OnFoot}

Active locomotion mode.

◆ pendingUncrouch

bool PlayerVisState::pendingUncrouch {false}

Deferred uncrouch (e.g. after slidehop); applied when safe.

◆ sprinting

bool PlayerVisState::sprinting {false}

True when sprint is active.

◆ targetCameraTilt

float PlayerVisState::targetCameraTilt {0.0f}

Target camera roll for wallrun lean (degrees).

◆ wallRunSide

WallSide PlayerVisState::wallRunSide {WallSide::None}

Wall side during WallRunning mode.


The documentation for this struct was generated from the following file: