Skip to content

TweakScale support for SimpleAdjustableFairings#15

Open
judicator wants to merge 2 commits intoblowfishpro:masterfrom
judicator:master
Open

TweakScale support for SimpleAdjustableFairings#15
judicator wants to merge 2 commits intoblowfishpro:masterfrom
judicator:master

Conversation

@judicator
Copy link

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.

private bool needsRecalculateDragCubes;
private bool needsNotifyFARToRevoxelize;

private float fairingScale = 1.0f;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like weird indentation here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I used tabs for intendation, as I got used to it. Sorry for breaking code conventions.

@blowfishpro
Copy link
Owner

I think this works, I wonder if we could just scale the root transform for each fairing segment though.

@judicator
Copy link
Author

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);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually hmm, why is multiplying the rootOffset by scale necessary? Shouldn't it not matter since TweakScale adjusts the whole model?

@blowfishpro
Copy link
Owner

Do you think this could solve TweakScale + B9PartSwitch + SAF issue? Or just for making code more clean?

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.

@blowfishpro
Copy link
Owner

Also due to Tweakscale issues in 1.11 I'm going to hold off on testing and merging this but I haven't forgotten.

@linuxgurugamer
Copy link

linuxgurugamer commented Sep 20, 2022

Have the Tweakscale issues been solved so this can be tested and then hopefully merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants