-
Notifications
You must be signed in to change notification settings - Fork 739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a factor to scale fatigue up and downhill #4492
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The finite diference based on getTerrainHeightASL
could be replaced by surfaceNormal
.
Also this coefficient is based on terrain height, and might be wrong when walking inside/over structures (e.g. walking along a pier). It might not be a huge deal though. To overcome that, actual height could be based on lineIntersect if getPosATL select 2 > 0
Currently this goes to zero if you walk along the slope, which we don't want. |
_slope = (surfaceNormal _pos) vectorDotProduct (vectorNormalized velocity ACE_player); Vector algebra 😄 |
EDIT: that's exactly what the original code did. |
Don't quite see the need for renaming |
What part of this is the "old slope penalty"? |
I just think it's weird to use |
|
|
That doesn't work though. For example, let's say I walk parallel to a slope.
In that case
which would then also become 0, so no penalty for walking on slopes, which is the opposite of what we want. |
Wanna trade with the weather issue report? |
Sure 😄 |
@@ -32,6 +32,14 @@ private _gearMass = ((loadAbs _unit + _virtualLoad) * 0.1 / 2.2046) * GVAR(loadF | |||
private _terrainFactor = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_terrainFactor
-> dead code?
* Fixes fatique calculation when walking across structures (bridges, ...) * Prevents sprinting on very steep terrain * Adds more in-depth debug output * Fixes the terrain gradient calculation * Closes #4492
* Fixes fatique calculation when walking across structures (bridges, ...) * Prevents sprinting on very steep terrain * Adds more in-depth debug output * Fixes the terrain gradient calculation * Closes #4492
* Fixes fatique calculation when walking across structures (bridges, ...) * Prevents sprinting on very steep terrain * Adds more in-depth debug output * Fixes the terrain gradient calculation * Closes #4492
* Fixes fatique calculation when walking across structures (bridges, ...) * Fixes the terrain gradient calculation * Fixes the 'wattsPerATP' constant * Implements the respiratory system * Prevents sprinting on very steep terrain * Adds more in-depth debug output * Closes #4492
* Fixes fatique calculation when walking across structures (bridges, ...) * Fixes the terrain gradient calculation * Fixes the 'wattsPerATP' constant * Implements the respiratory system * Prevents sprinting on very steep terrain * Adds more in-depth debug output * Closes #4492
When merged this pull request will:
_velocity
to_speed
so it's not confused with thevelocity
command I use for this and one is not inclined to replace it.