MOARdV / AvionicsSystems

MOARdV's Avionics Systems for Kerbal Space Program - a new generation of IVA enhancement.
Other
52 stars 26 forks source link

MODEL_SCALE affects other nodes #167

Closed MOARdV closed 6 years ago

MOARdV commented 6 years ago

Discovered during the conversion of ASET_HUD to MAS.

If a MODEL_SCALE is used to make some components disappear (using startScale = 0, 0, 0 and endScale = -1, -1, -1, it can affect other components that are initialized later. This happens because during initialization, the variable callback is triggered, and the transformation scale is applied before other parts initialize.

I have not thought of a solution yet.

MOARdV commented 6 years ago

Turns out that using a coroutine to delay applying the scale and registering the callback until the first FixedUpdate after configuration does the trick.