BrettRyland / BDArmory

Gun turrets and other weapon systems for KSP
35 stars 25 forks source link

BDArmory modular missile guidance breaks and targeting system window breaks in-game zoom #677

Open IliyaCherkesov opened 1 month ago

IliyaCherkesov commented 1 month ago

Describe the bug After being placed on rocket, the modular missile guidance part sometimes breaks, not being able to target anywhere - it just rolls uncontrollably into surface. Replacement of the part doesn't fix the problem. Helps only the full replacement of the vehicle, and sometimes even that is not the case, as in some cases only closing the game and opening again helps. Also, targeting system window sometimes locks the ability to zoom in and out to vehicle or rockets fired. Can be fixed only by using info tabs on the right.

To Reproduce To reproduce the first bug it is needed only to use modular missile guidance part, and the bug would occur by itself some time. The second bug seems to be the case only when you fire the missile, while your targeting window is opened, and you switch to rocket view.

Expected behavior Expected behavior of the part - missile guidance have to lead the rocket to target by calculated trajectory, and don't have to "corrupt" vehicle (on which the rocket is installed) after failing in targeting. Targeting window should not permanently block zoom. It has to block it when the mouse is hovering over the window of targeting pod, but when it is not - it has to give the user ability to zoom on vehicle again.

Logs

KSP.log

Screenshots If applicable, add screenshots to help explain your problem.

Additional context This problem seems to occur for several years for me, and I'm not sure if this problem is only mine. Missile guidance problem might be because of my misuse of the part, but I watched all of guides, and did everything according to them, but problem seems to repeat even with that

BrettRyland commented 1 month ago

The second issue is due to some legacy code (now removed in dev) that was overriding the game settings for the scroll wheel. With that removed, the scroll behaviour is as one would expect it to be, i.e., scolling within the targeting window adjusts the zoom level and scrolling outside the window (if not over other windows) zooms on the vessel.

The first issue is more difficult and isn't really an area of BDA that I've looked at much, so maybe some of the other devs might know more. Modular missiles have always been a bit janky and it very much depends on how the missile is built. I think (but am not sure) that the modular missile guidance part needs to be aligned with the control point orientation of whatever probe is being used to control the modular missile, which might explain the inability to fly straight that you describe, but I would expect that to not change from restarting KSP.

IliyaCherkesov commented 1 month ago

Thanks for the answer) I've looked upon my game, and uninstalled other mods one by one, leaving only BDA at the end. It seems like rescaling mods damage the modular mossile guidance part. Without size changes missiles behave as expected. Sorry for misinformation

BrettRyland commented 1 month ago

Well, rescaling mods (like tweakscale) adjust the mass of parts in non-linear ways, so your modular missile might be aerodynamically stable (CoL behind the CoM) at one size, but not at another, which might explain the observed behaviour.