SSTU - Shadow Space Technologies Unlimited

SSTU - Shadow Space Technologies Unlimited

98.5k Downloads

Parts surface-attached to tanks/srbs don't update their position when changing size of the tank/srb

MikeOnTea opened this issue ยท 4 comments

commented

I'm not sure how easy this would be to implement, but it would probably be nice to have.
Seen it mostly working with tanks from Procedural parts.

commented

Seen it mostly working with tanks from Procedural parts.

Different mods, different data available. I don't have complex mesh data available for these models like PP does -- all I have are some very basic parameters (height, diameter). (PP also did some very bad stuff last I checked regarding 'resetting' of manually offset parts, rendering it entirely unusable for my needs)

Might be able to get something working, but it will likely not be 100% correct -- only so much you can do with limited data.

commented

No idea what PP does, but i had assumed a rather simple scaling of the attached parts' attach point in regards to the center of the scaled object, so if you double the diameter of the object, the part's attach point's distance from the object center should correspondingly double in every dimension.

commented

Diameter adjustment isn't that hard, and should already be 'handled' (I -thought- the modular parts already did this, but perhaps I don't have that code active in all of them).

Its dealing with length adjustment that is difficult. How to tell if something is surface attached to the 'side' or 'top/bottom' of a part simply by its position relative to the parts' COM/origin?

commented

Well, i don't think it matters if it's side or top/bottom-attached, does it? If the length of eg. a tank gets doubled (let's call the axis y), then the attached part's y-distance from the tank's center get's doubled, no matter where it is attached.
That way scaling behaves sensible if you attach a part to a corner and you can't even tell if it's side or top/bottom attached and it doesn't matter because both would result in an equal moving of the part given the roughly same position.