Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Accuracy of Fixed Positions such as Start or End
#1
Hello,
I’m writing to ask about a solution for an issue I encountered while using the Obi Rope.
When I attach the rope’s start to another object, I clearly set the start point to the object’s local (0, 0, 0). However, if the object moves strongly, or if I turn the Obi Solver off and on again, the attachment point sometimes shifts away from the specified position.
Additionally, even when only the start is fixed, the update speed of the fixed position seems quite slow while the object is moving. I suspect this happens because it’s only updated in FixedUpdate, but I wonder if there’s any way to modify this behavior.
Also, when the Obi Solver is turned off and the fixed object moves slightly, I’d like the rope to reattach to the newly specified fixed position relative to the object when the solver is turned back on. Would I need to modify the Obi Particle Attachment directly to achieve this? I think there should be an internal option to choose the update method or specify fixed local position and rotation, and it should be guaranteed to work properly.
If there’s any external function or component that can update or refresh these position and offset values dynamically, please let me know.
For now, I’d be happy if the issues mentioned above could be resolved while using the system.
Thank you very much.
Reply
#2
Hi!

(21-10-2025, 09:18 PM)twocomet Wrote: However, if the object moves strongly,

Make sure the object moves before the solver is updated. Otherwise, there will be a 1-frame delay between the position of the object and the position of the attachment, leading to noticeable gaps (specially when the object moves fast).

(21-10-2025, 09:18 PM)twocomet Wrote: or if I turn the Obi Solver off and on again, the attachment point sometimes shifts away from the specified position.

This is the intended result. Attachments bind themselves at their current position relative to the target object at the time of being enabled, as explained in the manual. If you disable the solver game object, move the target object, then re-enable the solver, the attachment will bind to its current position (which may be different than the position it was bound to before disabling the solver).

If you don't want this behavior, simply set the position of the object and/or the attached particles to their desired values before enabling back the solver.

(21-10-2025, 09:18 PM)twocomet Wrote: Additionally, even when only the start is fixed, the update speed of the fixed position seems quite slow while the object is moving. I suspect this happens because it’s only updated in FixedUpdate, but I wonder if there’s any way to modify this behavior.

All physics simulation in Unity happens in FixedUpdate. Obi is no exception to this. You can force the rendered position of attached particles to be updated every frame by enabling the "Projection" checkbox in the attachment.

Quote:Projection: Moves the renderable position of the attached particles to the attachment point at the end of every frame. This helps ensuring there's no visual gaps between the particle group and the attachment's target, hiding any synchronization issues between particle and rigidbody simulations.

Quote:I think there should be an internal option to choose the update method

There is: the projection checkbox mentioned above. When disabled, attached particles are updated during simulation and rendered at their last updated position. When enabled, rendered positions are projected to the current attachment point every frame. Note that "projected" means they're rendered at the attachment position, but their physical position remains intact. This works just like transform.position and rigidbody.position in Unity.

Quote:and it should be guaranteed to work properly.

Attachments are guaranteed to work properly, since all they do is copy a position. However, something working properly and working as you want it to are often two different things. You must make sure components are updated in the proper order at the proper time during the frame (keeping Unity's execution order in mind is helpful) and that object/particle positions are set to correct values.

Quote:or specify fixed local position and rotation [...]
If there’s any external function or component that can update or refresh these position and offset values dynamically, please let me know.

You can specify a fixed position yourself very easily: 1) disable the attachment  2) move the particle and/or the target object to their desired relative positions 3) enable the attachment again. There's sample code to do this in the manual:
https://obi.virtualmethodstudio.com/manu...ments.html

There's no built-in option to do this since the exact behavior depends very much on specific gameplay needs: you could move the particle to the object, or the object to the particle, move both to an intermediate point, if there's multiple particles in the attachment you might want to move each one to a different position, etc. The most sensible behavior in all cases is to just use current positions, this allows you to modify them as you see fit before enabling the attachment.

Note that everything said here applies to every particle in Obi, not just start/end particles of a rope.


kind regards,
Reply