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

Bomb aiming reticle not working #92

Closed
MunGazer1 opened this issue Nov 16, 2016 · 8 comments
Closed

Bomb aiming reticle not working #92

MunGazer1 opened this issue Nov 16, 2016 · 8 comments
Labels
Milestone

Comments

@MunGazer1
Copy link

I completely deleted all my mods, uninstalled KSP and did a fresh install of the latest version of KSP on steam. Then, I downloaded the latest version of BD Armory continued from here and the latest version of module manager. With only bare bones BD Armory continued + ModuleManager 2.7.4.dll + KSP, the issue was as follows:

Tested using a stock aircraft with a weapon manager part and a mk 82 bomb attached to the bottom of the fuselage. The bomb aiming reticle, once above a very low altitude, will stay directly straight down below the aircraft. When I first encountered this issue, it was while heavily modded and I thought it must have been another mod that was causing the problem but now with this testing iteration I'm confident that the problem would be reproducible on another system.

@DoctorDavinci
Copy link
Collaborator

Could you confirm with only BDAc in a fresh KSP install if the bomb aiming reticle works or not?

I have had no problems with it with only BDAc installed and a confirmation of this on your end will tell us if it's MM causing the issue (which I suspect is the case)

@stasikos
Copy link

I can confirm it doesn't work without MM for me at least
#77

@stasikos
Copy link

I'm trying to debug this issue by placing some KSPLog.print() invocations into BDArmory code.
The only thing I noticed right now is a significant change in
currPos = ml.missileReferenceTransform.position;
value when plane climbs above 140m. While it changes permanently while below 140m:
[LOG 19:23:10.095] Currpos = (-238.8, 6.7, -291.4)
[LOG 19:23:10.105] Currpos = (-241.2, 6.8, -294.3)
[LOG 19:23:10.126] Currpos = (-243.5, 6.8, -297.1)
[LOG 19:23:10.141] Currpos = (-245.9, 6.9, -300.0)
[LOG 19:23:10.160] Currpos = (-248.3, 6.9, -302.9)

When plane goes above 140m it is not...
[LOG 19:23:10.194] Currpos = (2.8, 2.4, 2.7)
[LOG 19:23:10.218] Currpos = (2.8, 2.4, 2.7)
[LOG 19:23:10.231] Currpos = (2.8, 2.4, 2.7)
[LOG 19:23:10.244] Currpos = (2.8, 2.4, 2.7)
[LOG 19:23:10.260] Currpos = (2.8, 2.4, 2.7)
[LOG 19:23:10.293] Currpos = (2.8, 2.4, 2.7)
[LOG 19:23:10.310] Currpos = (2.8, 2.4, 2.7)
[LOG 19:23:10.328] Currpos = (2.8, 2.4, 2.7)

It makes me think something happens here and coordinates are no longer relative to ground but relative to plane CoM or something like it, but can't find any clues.

Many other things in BDArmory currently very depend in behaviour from altitude too. It seems clear to me this is the source of issue.
You can also check "Smoke Countermeasures" part putting it on a plane. While on ground animanion stays in place while plane is moving. When plane is flying above 140m, smoke animation sticks with plane. Same position issue, I think.

So, fixing this issue you can fix 90% of other similar issues... :)

@stasikos
Copy link

Update: for bombing reticle I've got positive results (working like it should at any altitude) by changing line 1899 of MissileFire.cs to
Vector3 simVelocity = vessel.srf_velocity;
Seems like rb_velocity switches to velocity relative to vessel and, as outcome, it can't compute bomb's velocity properly.

@gomker
Copy link
Collaborator

gomker commented Nov 18, 2016

@stasikos Thanks for that info. We have seen that 1.2 did change some methods on calculating position that may have affected this. We have also seen that some particle affects were changed.

We will test out those changes and let you know what we find

gomker added a commit to gomker/BDArmory that referenced this issue Nov 21, 2016
@gomker
Copy link
Collaborator

gomker commented Nov 21, 2016

Looks good to me so far - need to sync the changes with our support branch

@jrodrigv jrodrigv added this to the v0.11.1.7 milestone Dec 8, 2016
@jrodrigv
Copy link
Collaborator

jrodrigv commented Dec 8, 2016

In addition to the fix. I'm going to analyse and refactor all the uses of vessel.rb_velocity. I think we are using this in several places. This issue will be fixed on the next release.

Thanks guys.

@jrodrigv
Copy link
Collaborator

I'm going to close this issue because it has been fixed on our support branch and it will be delivered on the next release.

SuicidalInsanity referenced this issue in SuicidalInsanity/BDArmory Feb 7, 2021
dundun92 pushed a commit to dundun92/BDArmory that referenced this issue Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants