Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
VrGliderComponent.h
1#pragma once
2#include "Engine/Component/ArcadeGliderFlightModel.h"
3#include "Engine/Component/LogicComponent.h"
4#include "Engine/World/WindField.h"
5
6#include <glm/glm.hpp>
7#include <glm/gtc/quaternion.hpp>
8
9namespace EngineCore
10{
11 class Headset;
12} // namespace EngineCore
13
14namespace Input
15{
16 class InputManager;
17 class XrInputHandler;
18 enum class Hand;
19} // namespace Input
20
21namespace Engine
22{
23 namespace Rendering
24 {
25 class Headset;
26 } // namespace Rendering
27
38
48 {
49 float minArmSpreadDistance = 0.4f;
50 float armSpreadHysteresis = 0.08f;
51 float tuckDistance = 0.45f;
52
53 float gravity = 3.0f;
55
56 float momentumDrag = 0.12f;
57 float highSpeedDrag = 0.005f;
58 float minGlideSink = 0.65f;
59 float maxClimbRate = 6.0f;
60 float climbMomentumCost = 0.48f;
61 float diveSinkRate = 7.0f;
62 float diveMomentumGain = 0.72f;
63 float windMomentumGain = 0.72f;
64 float windDiminishingSpeed = 12.0f;
65 float windAlignmentPower = 1.6f;
66 float crosswindTurnRate = 0.06f;
67 float headwindPenalty = 0.55f;
68 float glideTurnRate = 7.0f;
69 float stallSpeed = 3.5f;
70 float stallRecoverySpeed = 4.7f;
71 float stallSinkSpeed = 6.0f;
72 float stallDiveSinkScale = 0.35f;
73 float stallExtraDrag = 0.12f;
74 float stallRecoveryDelay = 0.18f;
75 float emergencyMaxSpeed = 80.0f;
76
77 float snapTurnDegrees = 30.0f;
78 float snapTurnThreshold = 0.7f;
79 float stickDeadzone = 0.15f;
80
81 glm::vec3 spawnPosition{ 0.0f, 10.0f, 0.0f };
82
83 float walkSpeed = 2.5f;
84 float groundRayLength = 1.5f;
85 float groundSmoothSpeed = 12.0f;
86 float maxStepHeight = 0.3f;
87 float maxWalkableSlope = 0.7f;
88 float groundHoverOffset = 0.01f;
89 float walkTakeoffLiftSpeed = 2.0f;
90 float walkTakeoffMomentum = 4.0f;
91 float walkTakeoffClearance = 0.2f;
93 float fallResetY = -350.0f;
95 float respawnHeightOffset = 1.0f;
96 };
97
98 namespace Components
99 {
100 class PhysicsBody;
101
114 class VrGlider : public Logic
115 {
116 public:
117 static constexpr bool IsUnique = true;
118
119 static constexpr const char* ComponentName = "VrGlider";
120
121 static constexpr float CAPSULE_RADIUS = 0.3f;
122 static constexpr float CAPSULE_HALF_HEIGHT = 0.7f;
123 static constexpr float CAPSULE_TOTAL_HALF = 1.0f;
124
132 {
133 bool tickSkipped = false;
134 bool missingHeadset = false;
135 bool missingInputHandler = false;
136 bool missingPhysicsBody = false;
137
138 bool enabled = true;
139 bool frozen = true;
140 bool debugLogging = true;
143
144 float leftGrip = 0.0f;
145 float rightGrip = 0.0f;
146 bool bothGripsPressed = false;
147 bool bothGripsWerePressed = false;
148
149 float leftTrigger = 0.0f;
150 float rightTrigger = 0.0f;
151 bool leftTriggerPressed = false;
152 bool rightTriggerPressed = false;
153 glm::vec2 rightThumbstick{ 0.0f };
154 bool snapTurnArmed = true;
155 bool snapTurnTriggered = false;
157
158 bool leftHandValid = false;
159 bool rightHandValid = false;
160 float leftHandDistance = 0.0f;
161 float rightHandDistance = 0.0f;
164 bool armsSpread = false;
166 bool handsTucked = false;
167
168 bool groundDetected = false;
169 bool isNearGround = false;
170 bool groundIsWalkable = false;
171 bool groundYInitialized = false;
172 float groundDistance = 9999.0f;
173 float groundHitFraction = 1.0f;
174 glm::vec3 groundHitPoint{ 0.0f };
175 glm::vec3 groundHitNormal{ 0.0f, 1.0f, 0.0f };
176 float smoothedGroundY = 0.0f;
177
178 glm::vec3 playerPosition{ 0.0f };
179 glm::vec3 headLocalPosition{ 0.0f };
180 glm::vec3 headWorldPosition{ 0.0f };
181 glm::vec3 headForward{ 0.0f, 0.0f, -1.0f };
182 glm::vec3 bodyForward{ 0.0f, 0.0f, -1.0f };
183 glm::vec3 horizontalAim{ 0.0f, 0.0f, -1.0f };
184
185 glm::vec3 velocityBeforeUpdate{ 0.0f };
186 glm::vec3 targetVelocity{ 0.0f };
187 glm::vec3 velocityAfterUpdate{ 0.0f };
188 glm::vec3 desiredPosition{ 0.0f };
189 glm::vec3 physicsBodyVelocity{ 0.0f };
190
191 float playerYawRadians = 0.0f;
192 float palmTilt = 0.0f;
193 float forwardAmount = 0.0f;
194 float rightAmount = 0.0f;
195 float momentum = 0.0f;
196 float verticalVelocity = 0.0f;
197 float climbDemand = 0.0f;
198 float diveDemand = 0.0f;
199 float windAlignment = 0.0f;
200 float windMomentumDelta = 0.0f;
201 float dragDelta = 0.0f;
202 float climbMomentumDelta = 0.0f;
203 float stallRecoveryTimer = 0.0f;
204 bool isBraking = false;
205 bool isClimbing = false;
206 bool isDiving = false;
207 bool isStalled = false;
208 bool enteredStall = false;
209 bool recoveredStall = false;
210
212 glm::vec3 windContribution{ 0.0f };
213
214 bool collisionTested = false;
215 bool collisionImpact = false;
216 bool collisionReset = false;
217 bool takeoffArmed = true;
218 bool takeoffRequested = false;
219 bool takeoffBlocked = false;
220 bool hasLastSafeLanding = false;
221 bool respawnTriggered = false;
222 glm::vec3 takeoffTestPosition{ 0.0f };
223 glm::vec3 lastSafeLandingPosition{ 0.0f };
224 glm::vec3 collisionTestPosition{ 0.0f };
225 glm::vec3 collisionPushOut{ 0.0f };
226 glm::vec3 collisionGroundNormal{ 0.0f };
229
233 };
234
248 Entities::Scene * owningScene,
249 Rendering::Headset * headset,
250 Input::InputManager * inputManager,
251 PhysicsBody * physicsBody
252 );
253
255 ~VrGlider() override = default;
256
261 [[nodiscard]] std::string getComponentName() const override { return ComponentName; }
262
269 void beginPlay() override;
270
280 void tick( double deltaTime ) override;
281
283 void endPlay() override;
284
292 bool drawImGui() override;
293
298 [[nodiscard]] GliderState getState() const
299 {
300 return currentState_;
301 }
302
307 [[nodiscard]] glm::vec3 getVelocity() const
308 {
309 return velocity_;
310 }
311
316 [[nodiscard]] float getSpeed() const
317 {
318 return glm::length( velocity_ );
319 }
320
325 [[nodiscard]] const GliderConfig & getConfig() const
326 {
327 return config_;
328 }
329
338 {
339 return config_;
340 }
341
346 void setConfig( const GliderConfig & config )
347 {
348 config_ = config;
349 }
350
359 void setEnabled( bool enabled )
360 {
361 enabled_ = enabled;
362 }
363
368 [[nodiscard]] bool isEnabled() const
369 {
370 return enabled_;
371 }
372
382 void setFrozen( bool frozen );
383
393
398 [[nodiscard]] PhysicsBody * getPhysicsBody() const { return physicsBody_; }
399
404 [[nodiscard]] const DebugSnapshot & getDebugSnapshot() const { return debugSnapshot_; }
405
410 [[nodiscard]] bool isFrozen() const
411 {
412 return frozen_;
413 }
414
419 void setDebugLogging( bool enabled )
420 {
421 debugLogging_ = enabled;
422 }
423
428 [[nodiscard]] bool isDebugLogging() const
429 {
430 return debugLogging_;
431 }
432
438 [[nodiscard]] static const char * stateToString( GliderState state );
439
440 private:
444 struct HandData
445 {
446 glm::vec3 position{ 0.0f };
447 glm::vec3 relativePosition{ 0.0f };
448 glm::quat orientation{ 1.0f, 0.0f, 0.0f, 0.0f };
449 glm::vec3 palmNormal{ 0.0f, -1.0f, 0.0f };
450 glm::vec3 fingerDirection{ 0.0f, 0.0f, -1.0f };
451 glm::vec3 thumbDirection{ 0.0f, 1.0f, 0.0f };
452 float distanceFromHead = 0.0f;
453 bool isValid = false;
454 };
455
456 [[nodiscard]] HandData getHandData( Input::Hand hand ) const;
457
458 [[nodiscard]] bool areArmsSpread(
459 const HandData & leftHand,
460 const HandData & rightHand,
461 float hysteresis = 0.0f
462 ) const;
463
464 [[nodiscard]] bool areHandsTucked( const HandData & leftHand, const HandData & rightHand ) const;
465
466 void updateGlidingVelocity( const HandData & leftHand, const HandData & rightHand, float dt );
467
469
470 [[nodiscard]] glm::vec3 buildGlideDirection(
471 const HandData & leftHand,
472 const HandData & rightHand,
473 glm::vec3 & outBodyForward,
474 float & outForwardAmount,
475 float & outRightAmount
476 ) const;
477
479 [[nodiscard]] glm::vec3 getHeadWorldPosition() const;
480
482 [[nodiscard]] glm::quat getHeadOrientation() const;
483
485 [[nodiscard]] glm::vec3 getHeadForward() const;
486
487 bool canStartGlidingFromWalking( const glm::vec3 & currentPos, glm::vec3 & outTakeoffPos ) const;
488
489 bool handleFlightCollision( const glm::vec3 & currentPos, glm::vec3 & desiredPos );
490
492 const glm::vec3 & origin,
493 glm::vec3 & outHitPoint,
494 glm::vec3 & outHitNormal,
495 float & outHitFraction
496 ) const;
497
498 void updateWalkingInput( float dt );
499
500 glm::vec3 collideAndSlide( const glm::vec3 & startPos, const glm::vec3 & displacement );
501
502 void updateLastSafeLanding( const glm::vec3 & position, bool stableWalkableGround, float dt );
503
504 void teleportPlayer( const glm::vec3 & position );
505
507
509
513
516 bool takeoffArmed_ = true;
517
518 glm::vec3 velocity_{ 0.0f };
519 bool enabled_ = true;
520 bool frozen_ = true; // Start frozen so user can put on headset
521 bool debugLogging_ = true; // Enabled to diagnose flight tuning issues.
522 float debugLogTimer_ = 0.0f;
523 static constexpr float DEBUG_LOG_INTERVAL = 0.5f; // Log every 0.5 seconds
524
525 // Grip toggle detection (freeze/unfreeze)
527 static constexpr float GRIP_THRESHOLD = 0.8f; // Grip/trigger must be >80% to count as pressed
528
532 glm::vec3 lastSafeLandingPosition_{ 0.0f, 10.0f, 0.0f };
535
536 // Player yaw for right-stick snap turning (radians, applied to body forward)
537 float playerYaw_ = 0.0f;
539
540 // Walking state
541 float smoothedGroundY_ = 0.0f; // Lerp-smoothed ground height to prevent jitter
542 bool groundYInitialized_ = false; // Whether smoothedGroundY_ has been set from a sweep yet
543
544 // Sweep test constants
545 static constexpr float SKIN_WIDTH = 0.02f; // Small gap to prevent direct surface contact
546 static constexpr int MAX_SLIDE_ITERATIONS = 3; // Max collide-and-slide recursions
547 };
548 } // namespace Components
549
550} // namespace Engine
Logic(Entities::Scene *owningScene)
Constructs a logic component owned by a scene.
Component that manages a physics rigid body for an entity.
bool areArmsSpread(const HandData &leftHand, const HandData &rightHand, float hysteresis=0.0f) const
Input::InputManager * inputManager_
static constexpr float DEBUG_LOG_INTERVAL
glm::vec3 collideAndSlide(const glm::vec3 &startPos, const glm::vec3 &displacement)
void resetGliderStateTo(GliderState state)
Resets velocity and persistent flight state, then sets the current movement state.
static constexpr float GRIP_THRESHOLD
void updateWalkingInput(float dt)
void tick(double deltaTime) override
Advances locomotion and writes the updated player position.
void beginPlay() override
Initializes runtime state when the owning actor begins play.
glm::vec3 getHeadForward() const
Returns the headset forward vector in world space.
const GliderConfig & getConfig() const
Returns the current glider tuning values.
bool sweepGround(const glm::vec3 &origin, glm::vec3 &outHitPoint, glm::vec3 &outHitNormal, float &outHitFraction) const
bool drawImGui() override
Draws and edits glider state in the engine ImGui inspector.
bool handleFlightCollision(const glm::vec3 &currentPos, glm::vec3 &desiredPos)
glm::vec3 buildGlideDirection(const HandData &leftHand, const HandData &rightHand, glm::vec3 &outBodyForward, float &outForwardAmount, float &outRightAmount) const
bool isEnabled() const
Returns whether locomotion processing is enabled.
glm::vec3 getHeadWorldPosition() const
Returns the headset world position.
bool isFrozen() const
Returns whether movement is frozen.
static constexpr float CAPSULE_TOTAL_HALF
Half of the complete capsule height, including one radius.
float getSpeed() const
Returns the magnitude of the current locomotion velocity.
static constexpr int MAX_SLIDE_ITERATIONS
static constexpr float SKIN_WIDTH
static constexpr bool IsUnique
This component type is unique per actor.
GliderState getState() const
Returns the current movement state.
std::string getComponentName() const override
Returns the component registry name.
void setDebugLogging(bool enabled)
Enables or disables glider debug logging and debug drawing.
bool isDebugLogging() const
Returns whether glider debug logging and debug drawing are enabled.
static const char * stateToString(GliderState state)
Converts a glider state to a display string.
PhysicsBody * getPhysicsBody() const
Returns the physics body controlled by this component.
void updateLastSafeLanding(const glm::vec3 &position, bool stableWalkableGround, float dt)
bool areHandsTucked(const HandData &leftHand, const HandData &rightHand) const
void setConfig(const GliderConfig &config)
Replaces the active glider tuning values.
const DebugSnapshot & getDebugSnapshot() const
Returns diagnostics from the most recent tick.
void endPlay() override
Stops component play and calls the base Logic lifecycle hook.
void setFrozen(bool frozen)
Freezes or unfreezes player movement.
void updateGlidingVelocity(const HandData &leftHand, const HandData &rightHand, float dt)
HandData getHandData(Input::Hand hand) const
static constexpr const char * ComponentName
Component registry name.
glm::vec3 getVelocity() const
Returns the current locomotion velocity.
static constexpr float CAPSULE_HALF_HEIGHT
Half of the cylinder section height used by glider sweep tests.
void setEnabled(bool enabled)
Enables or disables locomotion processing.
VrGlider(Entities::Scene *owningScene, Rendering::Headset *headset, Input::InputManager *inputManager, PhysicsBody *physicsBody)
Creates a VR glider locomotion component.
void teleportPlayer(const glm::vec3 &position)
static constexpr float CAPSULE_RADIUS
Radius of the player capsule used by glider sweep tests.
~VrGlider() override=default
Destroys the component without owning the headset, input handler, or physics body.
bool canStartGlidingFromWalking(const glm::vec3 &currentPos, glm::vec3 &outTakeoffPos) const
ArcadeGliderTuning makeFlightTuning() const
glm::quat getHeadOrientation() const
Returns the headset world orientation.
GliderConfig & getConfig()
Returns mutable glider tuning values.
Owns scene entities, actor lifetime, and the scene graph root.
Definition Scene.h:84
Owns the OpenXR session, XR swapchain, eye transforms, and per-frame XR submission state.
Definition Headset.h:55
Action-based input dispatcher for polled input values and callbacks.
Creates OpenXR controller actions from the profile registry and samples the input state.
GliderState
Movement mode used by Engine::Components::VrGlider.
@ STALLED
Arms spread but speed is below the configured stall threshold.
@ FALLING
Airborne with gravity and horizontal momentum only.
@ WALKING
Grounded locomotion driven by the left thumbstick.
@ GLIDING
Arms spread; hand pose controls direction and climb or dive.
Hand
Index of a tracked hand in hand-indexed input arrays.
Persistent state carried between arcade glider simulation steps.
Stores the config values for the glider. Can be used to change the flight behavior of the glider move...
Diagnostics captured from the most recent tick() call.
float landingCheckpointTimer
Time accumulated toward saving the current landing checkpoint.
bool rightHandValid
True when the right-hand pose was valid.
bool leftTriggerPressed
True when the left trigger exceeds the configured grip threshold.
glm::vec3 headWorldPosition
Headset world position.
glm::vec3 groundHitNormal
World-space normal returned by the ground sweep.
int snapTurnDirection
Snap-turn direction, -1 for right, 1 for left, and 0 for none.
bool rightTriggerPressed
True when the right trigger exceeds the configured grip threshold.
float playerYawRadians
Accumulated player yaw applied by walking snap turns.
float palmTilt
Average palm tilt input passed to the flight model.
float capsuleRadius
Capsule radius used by sweep tests.
float rightGrip
Right grip analog value in the range reported by the XR input handler.
float diveDemand
Requested dive amount returned by the flight model.
GliderState previousState
State before this frame's transition logic.
glm::vec3 takeoffTestPosition
Candidate player position tested for walking takeoff clearance.
bool collisionReset
Reserved collision reset flag.
bool hasLastSafeLanding
True after a stable landing checkpoint has been recorded.
bool leftHandValid
True when the left-hand pose was valid.
float groundHitFraction
Hit fraction returned by the ground sweep.
bool bothGripsPressed
True when both grip values exceed the configured grip threshold.
float windMomentumDelta
Momentum gained or lost from wind during this frame.
glm::vec3 velocityAfterUpdate
Velocity after movement, collision, and state updates.
float stallRecoveryTimer
Current stall recovery timer.
bool snapTurnTriggered
True during the frame where a snap turn was applied.
GliderState currentState
State after this frame's transition logic.
bool tickSkipped
True when the component skipped movement for the frame.
bool isBraking
True when the current hand pose requests braking.
bool isClimbing
True when the current palm tilt requests climb.
float rightHandCylinderDistance
Horizontal distance from headset vertical axis to right hand.
float leftHandDistance
Distance from headset to left hand.
bool missingInputHandler
True when the component has no XR input handler pointer.
float groundDistance
Downward sweep distance to the detected ground.
World::WindSample windSample
Wind sample read at the player position.
bool isDiving
True when the current palm tilt requests dive.
glm::vec2 rightThumbstick
Right thumbstick value sampled from the XR input handler.
bool missingPhysicsBody
True when the component has no physics body pointer.
float dragDelta
Momentum lost to drag during this frame.
glm::vec3 playerPosition
Player locomotion-root position.
bool isStalled
True when the flight model is stalled.
float rightTrigger
Right trigger analog value in the range reported by the XR input handler.
glm::vec3 collisionPushOut
Push-out vector applied after collision.
float smoothedGroundY
Smoothed capsule-center Y position used while walking.
float collisionMaxPenetration
Maximum penetration reported by contact testing.
float windAlignment
Alignment between glide direction and sampled wind direction.
bool collisionImpact
True when the flight sweep hit another collider.
bool armsSpreadWithHysteresis
True when hand positions pass the arm-spread test with configured hysteresis.
float leftHandCylinderDistance
Horizontal distance from headset vertical axis to left hand.
bool isNearGround
True when ground is close enough to affect state transitions.
bool debugLogging
Debug logging flag sampled during the frame.
bool armsSpread
True when hand positions pass the arm-spread test without hysteresis.
float climbMomentumDelta
Momentum spent on climb during this frame.
bool frozen
Frozen flag sampled during the frame.
bool groundYInitialized
True after the smoothed walking ground height has an initial value.
float leftTrigger
Left trigger analog value in the range reported by the XR input handler.
glm::vec3 groundHitPoint
Capsule-center hit point returned by the ground sweep.
glm::vec3 velocityBeforeUpdate
Velocity before this frame's movement update.
glm::vec3 horizontalAim
Horizontal glide direction derived from hand pose.
glm::vec3 collisionTestPosition
Position tested by the flight collision sweep.
bool groundDetected
True when the downward capsule sweep found walkable or non-walkable ground.
float capsuleCylinderHeight
Cylinder section height used by the sweep capsule.
bool takeoffBlocked
True when takeoff was requested but blocked by clearance or latching.
glm::vec3 headLocalPosition
Headset local position inside the XR play space.
float verticalVelocity
Vertical velocity returned by the flight model.
bool takeoffArmed
True when the player can request takeoff from walking.
bool bothGripsWerePressed
Grip latch state from the previous grip-toggle update.
bool collisionTested
True when flight collision logic ran this frame.
float rightAmount
Right control amount derived from hand pose.
glm::vec3 windContribution
Wind velocity applied to the flight model.
float climbDemand
Requested climb amount returned by the flight model.
glm::vec3 collisionGroundNormal
Surface normal returned by the flight collision sweep.
float forwardAmount
Forward control amount derived from hand pose.
float capsuleTotalHeight
Total capsule height used by sweep tests.
bool respawnTriggered
True during the frame where fall reset triggered.
bool recoveredStall
True during the frame where the flight model recovered from stall.
bool enteredStall
True during the frame where the flight model entered stall.
float momentum
Horizontal speed component used as glider momentum.
glm::vec3 physicsBodyVelocity
Linear velocity read back from the attached physics body.
float leftGrip
Left grip analog value in the range reported by the XR input handler.
bool enabled
Runtime enabled flag sampled during the frame.
glm::vec3 desiredPosition
Requested player position before the final headset and physics body write.
bool takeoffRequested
True when arms were spread while walking.
bool missingHeadset
True when the component has no headset pointer.
bool snapTurnArmed
True when the right stick has returned to the deadzone and can trigger another snap turn.
glm::vec3 bodyForward
Horizontal body-forward direction used by gliding and walking.
bool groundIsWalkable
True when the ground normal passes GliderConfig::maxWalkableSlope.
bool handsTucked
True when both hands are close to the headset vertical axis.
float rightHandDistance
Distance from headset to right hand.
glm::vec3 targetVelocity
Velocity returned by the flight model before collision response.
glm::vec3 headForward
Headset forward direction in world space.
glm::vec3 lastSafeLandingPosition
Last stable walkable position used for respawn.
Hand position and orientation data relative to head.
Runtime tuning values for Engine::Components::VrGlider.
float respawnHeightOffset
Vertical offset added when respawning at the last safe landing point.
float stallExtraDrag
Extra drag applied while stalled.
float groundRayLength
Downward sweep distance for ground detection.
float tuckDistance
Maximum horizontal distance from the headset axis for hands to count as tucked.
float maxClimbRate
Maximum upward speed requested by palm tilt.
float climbMomentumCost
Horizontal momentum spent per unit of climb demand.
float diveMomentumGain
Horizontal momentum gained per unit of dive demand.
float headwindPenalty
Momentum penalty applied when flying into wind.
float walkSpeed
Maximum walking speed on walkable ground.
float maxStepHeight
Reserved step-height value for walking movement.
float stallSpeed
Horizontal speed below which a climbing glider enters stall.
float walkTakeoffMomentum
Minimum horizontal speed applied when taking off from walking.
float fallingTerminalVelocity
Maximum downward speed while falling.
float snapTurnThreshold
Right thumbstick X value required to trigger a walking snap turn.
float highSpeedDrag
Additional drag applied as speed increases.
float armSpreadHysteresis
Extra arm-spread distance required before leaving the current gliding state.
float groundSmoothSpeed
Exponential smoothing rate used when following ground height.
float stallSinkSpeed
Downward speed while stalled.
float flightCollisionFallSpeed
Downward velocity applied after hitting a non-walkable surface in flight.
float walkTakeoffLiftSpeed
Upward velocity applied when taking off from walking.
glm::vec3 spawnPosition
Position used by spawn reset and as the initial safe landing position.
float groundHoverOffset
Vertical offset kept above walkable ground.
float momentumDrag
Baseline horizontal momentum drag applied by the flight model.
float windAlignmentPower
Exponent applied to wind alignment before adding wind momentum.
float gravity
Downward acceleration applied while falling.
float fallResetY
World Y position below which the glider respawns at the last safe landing point.
float stallDiveSinkScale
Scale applied to dive sink while stalled.
float landingCheckpointSettleTime
Time spent settled on walkable ground before updating the landing checkpoint.
float emergencyMaxSpeed
Hard velocity clamp for flight-model safety.
float minGlideSink
Minimum downward speed maintained during normal gliding.
float minArmSpreadDistance
Minimum distance each hand must be from the headset before arms count as spread.
float windMomentumGain
Horizontal momentum gained from aligned wind.
float glideTurnRate
Direction interpolation rate toward the current glide input.
float maxWalkableSlope
Minimum ground-normal Y component accepted as walkable.
float diveSinkRate
Downward speed requested by full dive input.
float walkTakeoffClearance
Upward clearance sweep distance required before walking takeoff.
float windDiminishingSpeed
Speed at which wind acceleration starts diminishing.
float stallRecoveryDelay
Time above recovery speed before a stall exits.
float stickDeadzone
Thumbstick magnitude ignored as input noise.
float crosswindTurnRate
Steering influence from crosswind.
float stallRecoverySpeed
Horizontal speed required before stall recovery can complete.
float snapTurnDegrees
Yaw angle applied by one walking snap turn.
Wind field result at one world-space point.
Definition WindField.h:62