12-08-2025, 10:06 AM
(12-08-2025, 08:57 AM)josemendez Wrote: The fix is very simple: just check the imaginary part of the quaternion instead of all of it when determining which rest orientation is closest to the current one, q or -q. This affects both pin and bend/twist constraints, so for your convenience I'm attaching the files where this was changed: replace your version ofBurstBendTwistConstraintsBatch.cs and BurstPinConstraintsBatch.cs with the ones I'm attaching.
Note this will still allow the attachment to jump to the opposite rest orientation when the current relative orientation is closer to the opposite than the initial orientation (which may happen during violent movement, more than 90ยบ degrees in a single frame) but this is easy to prevent with a second attachment as originally suggested.
While working on this, I think I figured out a way to prevent the ambiguity completely by enforcing the orientation constraint in a different manner. That will have to wait until 7.2 though.
Yeah, now it works as expected. Thank you very much!