Recoil - Add custom recoil shake coef#11379
Open
some-evil-kitty wants to merge 10 commits into
Open
Conversation
Contributor
Author
|
...come to think of it i could also make this scale based on weapon inertia (more inertia == less shake because Gun Move Slower) |
TheCandianVendingMachine
requested changes
May 26, 2026
TheCandianVendingMachine
approved these changes
May 27, 2026
Contributor
Author
|
For my specific application, I need to reduce launcher shake dramatically. It's far too niche IMO to be an actual setting, but I made it a gvar rather than a magic number. |
johnb432
reviewed
May 28, 2026
PabstMirror
reviewed
May 30, 2026
| _recoil = [0, 0]; | ||
| }; | ||
|
|
||
| private _customShakeCoef = if (isNumber (configFile >> "CfgRecoils" >> _recoil >> QGVAR(customShakeCoef))) then { |
Contributor
There was a problem hiding this comment.
_recoil will be an array here
needs to be moved above line 41
PabstMirror
reviewed
May 30, 2026
| #include "script_component.hpp" | ||
|
|
||
| // This is too niche to be a setting, but making it not just hardcoded is good | ||
| GVAR(extraLauncherShake) = 25.0; |
Contributor
There was a problem hiding this comment.
should move this to preInit to reduce load order conflicts (if another mod sets in their postInit)
or just use
_powerCoef = _powerCoef + (missionNamespace getVariable [QGVAR(extraLauncherShake), 25]);
Contributor
Author
There was a problem hiding this comment.
Yeah, will move to preinit. Mods then won't need to load-order it.
PabstMirror
requested changes
May 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When merged this pull request will:
Some guns have a TON of shake if they have a ton of kickBack, so it'd be nice to be able to manually tune it down on import. (I specifically need this because of a launcher gun thing, but the idea is applicable to rifles with large amounts of kickBack in the recoil)