Skip to content
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

Common - Add support for commander turrets to cba_common_fnc_turretDir #1507

Merged
merged 1 commit into from
Dec 18, 2021

Conversation

PabstMirror
Copy link
Contributor

@PabstMirror PabstMirror commented Oct 9, 2021

Some turrets like the blu wheeled IFV don't have gunBeg defined because they don't have any weapons.

https://community.bistudio.com/wiki/eyeDirection

Returns the direction object is watching (eyes, or a vehicle primary observer).

@jonpas jonpas changed the title Common - Add support for commander turrets to cba_common_fnc_turretDir Common - Add support for commander turrets to cba_common_fnc_turretDir Oct 9, 2021
@jonpas jonpas added this to the 3.15.7 milestone Oct 9, 2021
@commy2
Copy link
Contributor

commy2 commented Oct 12, 2021

What if the turret has primaryObserver as well as gunBeg and gunEnd?

@PabstMirror
Copy link
Contributor Author

this is after the if (_gunEnd isEqualTo _gunBeg) then { check so it's just a fallback, but they should be the same in either case

@PabstMirror
Copy link
Contributor Author

Tested on
"B_APC_Wheeled_01_cannon_F"
"B_AFV_Wheeled_01_cannon_F"
"B_MBT_01_cannon_F"
"O_APC_Tracked_02_cannon_F"

All go from just [0,0] to giving actual angles that match the hud dir/elev display

@commy2 commy2 merged commit 45e8d9b into master Dec 18, 2021
@commy2 commy2 deleted the cmdTurretDir branch December 18, 2021 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants