KSPModdingLibs / KSPCommunityFixes

Community patches for bugs in the KSP codebase
49 stars 17 forks source link

Rotating a part in the VAB flipping the model #231

Open Rodg88 opened 2 months ago

Rodg88 commented 2 months ago

Visible on parts with asymmetric textures like the stock mk2 rocket fuel fuselage. In this video, I've just pressed w 4 times, and after two presses, a 180 degree rotation, the black stripes are still showing on the same side as on the initial position, except the part is upside down.

https://github.com/KSPModdingLibs/KSPCommunityFixes/assets/2611674/a26a58f7-2c15-4888-9d3c-25cbc3dcfde7

I've also had it happen after rolling right with e once, then spinning the part with d. In this video I press e once, then d only

https://github.com/KSPModdingLibs/KSPCommunityFixes/assets/2611674/13de415e-a04c-42fd-93f7-71c6a568fc2f

Attached parts are rotated correctly.

It's more of an issue with more asymmetric parts like this X-15 fuselage, where the tan lines near the rear should be on the bottom, but rotating it around they will occasionally swap to the top. It even stops happening after a while too (0:25+ in this video it stops happening).

https://github.com/KSPModdingLibs/KSPCommunityFixes/assets/2611674/4e5eaea0-61b7-4de1-afee-8a73d2e2a0a7

And after it's been flipped, the transform-based nodes are also flipped - though the attached fin is still on "top" (relative to the cockpit) image

Rodg88 commented 2 months ago

I don't know why it doesn't affect less symmetrical parts, like the cockpits, even the mk2 in-line.

Rodg88 commented 2 months ago

It seems having mirrorRefAxis = 0, 0, -1 in the part cfg is what causes it. Removing it fixes the part rotation bug, but then the part attaches in mirror symmetry without flipping the symmetry partner.