TweakScale support for SimpleAdjustableFairings#15
TweakScale support for SimpleAdjustableFairings#15judicator wants to merge 2 commits intoblowfishpro:masterfrom
Conversation
| private bool needsRecalculateDragCubes; | ||
| private bool needsNotifyFARToRevoxelize; | ||
|
|
||
| private float fairingScale = 1.0f; |
There was a problem hiding this comment.
seems like weird indentation here?
There was a problem hiding this comment.
Yeah, I used tabs for intendation, as I got used to it. Sorry for breaking code conventions.
|
I think this works, I wonder if we could just scale the root transform for each fairing segment though. |
Do you think this could solve TweakScale + B9PartSwitch + SAF issue? Or just for making code more clean? |
| if (prefab == null) throw new ObjectNotFoundException(transformName); | ||
|
|
||
| return new ResolvedModelData(prefab, mass, CoM, rootOffset); | ||
| return new ResolvedModelData(prefab, mass * scale * scale, CoM * scale, rootOffset * scale); |
There was a problem hiding this comment.
Actually hmm, why is multiplying the rootOffset by scale necessary? Shouldn't it not matter since TweakScale adjusts the whole model?
Just to make the code more clean, generally it would be nice to have the internals not care about scale and just multiply everything at the end. |
|
Also due to Tweakscale issues in 1.11 I'm going to hold off on testing and merging this but I haven't forgotten. |
|
Have the Tweakscale issues been solved so this can be tested and then hopefully merged? |
Fairings walls and caps masses are scaled proportional to scale squared (it's hardcoded). I think, it's a good approach.
TweakScale patches for individual fairing parts are in SimpleAdjustableFairings-KWFairings repo.