23-05-2023, 12:24 PM
(23-05-2023, 12:17 PM)patrakus Wrote: We are using Obi Rope to simulate cables connected to tools inside machine in VR and we encountered issue, where when we moved object with attached rope, the mesh of rope is behind aproximetly one frame relativly to moved object. I checked forum and docs and I only found that someone had similar issue, but it was never resolved. In project we are using URP specifically for Quest 2. What could possibly couse this issue?
Hi!
Make sure you're moving the object before the simulation takes place each frame. If you move the object after, then there will be a 1 frame delay as the rope simulation will react to the object's movement in the next frame.
There's many ways to do this, depending on what your setup is and how you're currently moving the object. For instance, using a different ObiUpdater component that ensures simulation happens after wherever you're updating the object, changing script execution order in case both the object and the solver are updated in the same Unity event, or using the ObiSolver callbacks to update your object.
kind regards,