Posts: 45
Threads: 8
Joined: May 2025
Reputation:
0
17-08-2025, 07:10 PM
Hello!
I've sent the test project to the support(at)virtualmethodstudio.com.
The project has player, and platforms attached to the rope. When the player jumps on any of them, the platforms fall down a bit and than come back to default position very sharply.
The one fix for this that I've found is use many character joints attached to each of the platforms but it is quite messy and I'm sure the solution is much simpler and all Obi-based.
P.S. Please do not answer to the email, thanks.
Kind regards,
Posts: 6,589
Threads: 27
Joined: Jun 2017
Reputation:
431
Obi Owner:
18-08-2025, 08:20 AM
(This post was last modified: 18-08-2025, 08:20 AM by josemendez.)
(17-08-2025, 07:10 PM)quent_1982 Wrote: Hello!
I've sent the test project to the support(at)virtualmethodstudio.com.
The project has player, and platforms attached to the rope. When the player jumps on any of them, the platforms fall down a bit and than come back to default position very sharply.
The one fix for this that I've found is use many character joints attached to each of the platforms but it is quite messy and I'm sure the solution is much simpler and all Obi-based.
P.S. Please do not answer to the email, thanks.
Kind regards,
Hi,
Obi and Unity's built-in rigidbody physics are separate physics engines, and are updated separately. This means there's always at least 1 simulation step of latency between force exchanges between them. They're also updated at different frequencies, Obi's update frequency being Unity's fixed timestep / ObiSolver's substeps.
You're currently updating Unity's physics with a timestep of 0.015 seconds, and Obi is being updated at 0.015/4 = 0.00375. As a result, any forces calculated by the rope will take 4 full Obi physics updates before they're applied on the rigidbody planks. This makes them react late to them.
To bring this down to 1 simulation step (the minimum), set your project's fixed timestep to 0.00375 and your ObiSolver's amount of substeps to 1. Both engines will update at the same frequency, so at most one simulation step will pass between the character pushing down a plank and the rope applying a force to counteract this.
kind regards,
Posts: 45
Threads: 8
Joined: May 2025
Reputation:
0
(18-08-2025, 08:20 AM)josemendez Wrote: Hi,
Obi and Unity's built-in rigidbody physics are separate physics engines, and are updated separately. This means there's always at least 1 simulation step of latency between force exchanges between them. They're also updated at different frequencies, Obi's update frequency being Unity's fixed timestep / ObiSolver's substeps.
You're currently updating Unity's physics with a timestep of 0.015 seconds, and Obi is being updated at 0.015/4 = 0.00375. As a result, any forces calculated by the rope will take 4 full Obi physics updates before they're applied on the rigidbody planks. This makes them react late to them.
To bring this down to 1 simulation step (the minimum), set your project's fixed timestep to 0.00375 and your ObiSolver's amount of substeps to 1. Both engines will update at the same frequency, so at most one simulation step will pass between the character pushing down a plank and the rope applying a force to counteract this.
kind regards,
Hello, thanks for reply!
Wow, that TimeStep value is too low for my game, so that fix isn’t applicable in my case. Do you have any other ideas? All suggestions would be greatly appreciated.
Kind regards,
Posts: 6,589
Threads: 27
Joined: Jun 2017
Reputation:
431
Obi Owner:
(18-08-2025, 08:34 AM)quent_1982 Wrote: Hello, thanks for reply!
Wow, that TimeStep value is too low for my game, so that fix isn’t applicable in my case. Do you have any other ideas? All suggestions would be greatly appreciated.
Kind regards,
Hi,
Not really, that's just how physics engines in general work. Your other option is to constrain the planks using tools available in their own physics engine (eg. joints, as you're already doing as a workaround) as that has zero latency: both planks and joints are updated simultaneously, in the same simulation step.
kind regards,
Posts: 45
Threads: 8
Joined: May 2025
Reputation:
0
(18-08-2025, 08:47 AM)josemendez Wrote: Hi,
Not really, that's just how physics engines in general work. Your other option is to constrain the planks using tools available in their own physics engine (eg. joints, as you're already doing as a workaround) as that has zero latency: both planks and joints are updated simultaneously, in the same simulation step.
kind regards,
I’ll stick with the joint-based approach then, since it avoids the latency issue. Appreciate your explanation!
Kind regards,
Posts: 28
Threads: 2
Joined: May 2025
Reputation:
2
(17-08-2025, 07:10 PM)quent_1982 Wrote: When the player jumps on any of them, the platforms fall down a bit and than come back to default position very sharply. I don't see the behavior in your scene but have you tried decrease the mass of the player? I have similar problem in my game in which I managed to resolve/reduce the problem by dynamically adjusting mass ratio.
|