07-05-2021, 08:07 AM
(This post was last modified: 07-05-2021, 08:39 AM by josemendez.)
(07-05-2021, 07:57 AM)headcoach Wrote: I have a rope attached at two points, when disabling the rope component or its game object and then re-enabling it, one of the attachments bugs out and is offset by a few meters. How can fix this? Whats the proper way of disabling and then re-enabling a rope?
Thanks
Hi there,
I'm unable to reproduce this so far. Disabling and re-enabling a rope should should not alter attachment behavior at all.
What Unity version are you using?
What Obi version are you using?
Which backend? (Oni or Burst)?
What kind of attachments? (static or dynamic)?
Note: Attachments will attach the particle to the target at whatever position the particle is in (relative to the target) when they're enabled. This is done to prevent overstretching and sudden jumps in simulation.
This also means that, if you're using a dynamic attachment to attach to a rigidbody and you only disable the rope, the rigidbody will fall (no longer supported by the rope) and when re-enabling the attachment, it will be attached in a different position. In these cases you generally want to disable both the rigidbody and the rope together, or manually set the particle positions before re-enabling the rope.