Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
ArcadeGliderFlightModel.h
Go to the documentation of this file.
1#pragma once
2
3#include <glm/glm.hpp>
4
6{
12 {
13 float momentumDrag = 0.12f;
14 float highSpeedDrag = 0.005f;
15 float minGlideSink = 0.65f;
16 float maxClimbRate = 6.0f;
17 float climbMomentumCost = 0.48f;
18 float diveSinkRate = 7.0f;
19 float diveMomentumGain = 0.72f;
20 float windMomentumGain = 0.72f;
21 float windDiminishingSpeed = 12.0f;
22 float windAlignmentPower = 1.6f;
23 float crosswindTurnRate = 0.06f;
24 float headwindPenalty = 0.55f;
25 float glideTurnRate = 7.0f;
26 float stallSpeed = 3.5f;
27 float stallRecoverySpeed = 4.7f;
28 float stallSinkSpeed = 6.0f;
29 float stallDiveSinkScale = 0.35f;
30 float stallExtraDrag = 0.12f;
31 float stallRecoveryDelay = 0.18f;
32 float emergencyMaxSpeed = 80.0f;
33 };
34
36 {
37 bool stalled = false;
38 float stallRecoveryTimer = 0.0f;
39 };
40
42 {
43 glm::vec3 velocity{ 0.0f };
44 glm::vec3 glideDirection{ 0.0f, 0.0f, -1.0f };
45 glm::vec3 windVelocity{ 0.0f };
46 float palmTilt = 0.0f;
47 float deltaTime = 0.0f;
49 };
50
52 {
53 glm::vec3 velocity{ 0.0f };
54 glm::vec3 glideDirection{ 0.0f, 0.0f, -1.0f };
55 float momentum = 0.0f;
56 float verticalVelocity = 0.0f;
57 float climbDemand = 0.0f;
58 float diveDemand = 0.0f;
59 float windAlignment = 0.0f;
60 float windMomentumDelta = 0.0f;
61 float dragDelta = 0.0f;
62 float climbMomentumDelta = 0.0f;
63 bool stalled = false;
64 bool enteredStall = false;
65 bool recoveredStall = false;
66 float stallRecoveryTimer = 0.0f;
67 };
68
70 const ArcadeGliderTuning & tuning,
71 const ArcadeGliderInput & input
72 );
73} // namespace Engine::Components
ArcadeGliderStep stepArcadeGliderFlight(const ArcadeGliderTuning &tuning, const ArcadeGliderInput &input)
Stores the config values for the glider. Can be used to change the flight behavior of the glider move...