Compensating for a springconstraint's visual offset - take 2

apologies for terrible formatting

  1. What do you want to achieve? change an attachment’s position so it compensates for the offset caused by a springconstraint’s radius

  2. What is the issue?
    when the parent part’s orientation is (0, 0, 0), you can simply offset a radius of 1 by entering (0, -1, 0) on top of the attachment position. this causes the visual start of the springconstraint to be where you’d expect it to be (as it is with ropeconstraints, for example)


    before (red = +x, green = +y, blue = +z):

    after attachment0.position = (0, -1, 0):

    the visual start of this springconstraint is now close enough to the part’s center to look like it originates there

however, when the orientation changes, so does the positional offset required to achieve the same effect

before:


after attachment0.position = (0, -1, 0):

spoiler alert: the correct positional offset was…


(-0.707, -0.707, 0) in this case is..

attachment0.WorldAxis * -1

but wait… if i got the correct offset by doing that, can’t i just apply it to all else?


you wish.. while using the WorldAxis doesn’t net us the right result, the correct offset here could however come from a simple axis calculation, this time using

attachment0.WorldSecondaryAxis * -1

which results in (0, -1, 0) which produces a satisfactory result as mentioned earlier
so it has to be one of the two and then a simple calculation, no?
let’s try again with a more realistic orientation (30, -35.264, -54.736) (using rotate tool, 45 degrees on Z-axis, then 45 on X)
before:


you can try countless combinations with the world(secondary)axis, orientation and whatnot. with that in mind, try to think of a simple formula to get the right positional offset here
after some trial and error:

did you guess correctly? there is either no simple formula, or i have missed it all this time (which i hope is the case). why would (0.5, -0.8, -0.2) net us a normal result here? don’t ask me!

as shown above, i have no clue on how to read what way a springconstraint will snap to as it rotates, and it gets Very Hard to try to compensate for something unpredictable (refer to my last post on this topic)
as another example…
orientation: (0, 0, 90)

orientation: (0, 0, >90)


two degrees difference in orientation makes for two studs difference in required offset, fun!

hoping someone has figured out a way to properly compensate for a springconstraint’s visual offset caused by its radius
or anything that could help at this point

If this bothers you THAT MUCH, your only option would be to hide the spring and make your own effect (easier said than done)

..which is why i’m asking in the first place