Obi Official Forum
Rod not following attachment correctly - Printable Version

+- Obi Official Forum (http://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (http://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (http://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Rod not following attachment correctly (/thread-3549.html)



Rod not following attachment correctly - iamthehone - 10-08-2022

Hi there!

I have the same problem as someone here

http://obi.virtualmethodstudio.com/forum/thread-3352.html?highlight=lagging+behind+attachment

on Obi 6.4, using Rod.

I've moved the accumulatedTime line to top of the Update, and the rod end still doesn't follow the rigidbody correctly. I've tried with and without interpolation enabled on both obi rod and the rigidbody.

Here is the gif

https://imgur.com/a/EwcaYFQ


Code:
private void Update()
{
accumulatedTime += Time.deltaTime;

ObiProfiler.EnableProfiler();
Interpolate(Time.fixedDeltaTime, accumulatedTime);
ObiProfiler.DisableProfiler();
}



RE: Rod not following attachment correctly - josemendez - 10-08-2022

(10-08-2022, 05:12 PM)iamthehone Wrote: Hi there!

I have the same problem as someone here

http://obi.virtualmethodstudio.com/forum/thread-3352.html?highlight=lagging+behind+attachment

on Obi 6.4, using Rod.

I've moved the accumulatedTime line to top of the Update, and the rod end still doesn't follow the rigidbody correctly. I've tried with and without interpolation enabled on both obi rod and the rigidbody.

Here is the gif

https://imgur.com/a/EwcaYFQ


Code:
private void Update()
{
accumulatedTime += Time.deltaTime;

ObiProfiler.EnableProfiler();
Interpolate(Time.fixedDeltaTime, accumulatedTime);
ObiProfiler.DisableProfiler();
}

The problem described in the thread you linked to only happens when enabling state interpolation in the solver. There should be zero delay when not using it.

In your gif, it looks like you're moving the rod attachment after the simulation for that frame has finished, so there's a 1 frame delay between both. How are you moving the hand around, and when are you updating the simulation? (that is, which ObiUpdater component are you using?)