-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
[Highly Customized] Jumpjet Tilts While Moving #1521
base: develop
Are you sure you want to change the base?
[Highly Customized] Jumpjet Tilts While Moving #1521
Conversation
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
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.
Looks good, few style and readability issues.
I have a few suggestions though:
- Ability to control how much the jumpjet tilts, I imagine via separate factors for forward and sideway tilts.
- Ability to account acceleration for directional tilt (when accelerating - tilt forwards, decelerating - tilt backwards to decelerate). This could work additionally to movement-dependant tilt.
- Debatable: ability to account speed for rotational tilt, because static helicopter rotating via tilt looks weird, and to do sharp turns at high speed you must tilt a lot. But maybe could just remove rotation sideways tilt when not moving.
JumpjetTilt.ForwardAccelFactor ; FAF
JumpjetTilt.ForwardSpeedFactor ; FSF
JumpjetTilt.SidewaysRotationFactor ; SRF
JumpjetTilt.SidewaysSpeedFactor ; SSF
Pseudocode to show what I mean:
arf += movement_acceleration * FAF + movement_speed * FSF
ars += rotation_speed * SRF * movement_speed * SSF
(By the way, I am not sure I understand the current sideways rotation logic correctly. What does it depend on?)
What do you think?
constexpr auto factor = (Math::HalfPi / 4) / 32; | ||
arf += static_cast<float>(std::min(32.0, pThis->CurrentSpeed) * factor); | ||
} | ||
|
||
const auto& locoFace = pThis->LocomotionFacing; | ||
|
||
if (locoFace.IsRotating()) | ||
{ | ||
constexpr auto factor = (Math::HalfPi / 4) / 32768 / 65536; | ||
const auto leftRaw = locoFace.RotationTimer.GetTimeLeft() * locoFace.ROT.Raw; | ||
const auto dirMult = (static_cast<short>(locoFace.Difference().Raw) * leftRaw); |
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.
It would be good to have an explanation in a comment about what is the calculation logic. Also magic numbers should be fixed.
If a tilting jumpjet is affected by EMP, it'll gradually resume to normal stance while being EMP'd. Not sure if it should behave like that |
JumpjetTilt
to true.In
rulesmd.ini
:Ground units being lifted will turn to attacker weirdly.