Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Unstable chain attachment
#11
(15-05-2025, 12:16 PM)quent_1982 Wrote: Hello, I sent you project link yesterday, have you already found a solution?

Hi,

Haven’t had a chance to look at it yet, sorry. Will do asap and get back to you.

Kind regards
Reply
#12
Hi!

Just took a look at your project, the gap you're seeing in between the rope and the lamp is normal: joints in Unity are updated during Unity's internal physics update, which takes place after FixedUpdate() (that is, after Obi has applied corrective impulses to all rigidbodies). As a result, corrections performed by joints have priority over Obi's own corrections. No matter how many substeps you use in Obi, joints have the "last word" over rigidbody velocity values and what the physics state is at the end of each frame.

There's a simple solution to this: instead of using more substeps for Obi, use more steps for all physics.

In your sample project, reduce the project's timestep (ProjectSettings->Time->FixedTimestep) to 0.01 instead of 0.02, then reduce and the amount of Obi substeps from 4 to 2. Obi will still be updated at the same frequency (0.01/2 = 0.005, same as 0.02/4) but this will noticeably reduce the gap, specially at high speeds.

Another potential solution (that may be combined with the above one) is to increase the joint's mass scale, or reduce the connected mass scale. This helps reduce the correction applied by the joint, reducing the gap.

kind regards
Reply
#13
Dedo arriba 
(Yesterday, 02:53 PM)josemendez Wrote: Hi!

Just took a look at your project, the gap you're seeing in between the rope and the lamp is normal: joints in Unity are updated during Unity's internal physics update, which takes place after FixedUpdate() (that is, after Obi has applied corrective impulses to all rigidbodies). As a result, corrections performed by joints have priority over Obi's own corrections. No matter how many substeps you use in Obi, joints have the "last word" over rigidbody velocity values and what the physics state is at the end of each frame.

There's a simple solution to this: instead of using more substeps for Obi, use more steps for all physics.

In your sample project, reduce the project's timestep (ProjectSettings->Time->FixedTimestep) to 0.01 instead of 0.02, then reduce and the amount of Obi substeps from 4 to 2. Obi will still be updated at the same frequency (0.01/2 = 0.005, same as 0.02/4) but this will noticeably reduce the gap, specially at high speeds.

Another potential solution (that may be combined with the above one) is to increase the joint's mass scale, or reduce the connected mass scale. This helps reduce the correction applied by the joint, reducing the gap.

kind regards

Thank you for a such detailed answer! I’ll test your solutions out and let you know which one works best for my project.
Reply
#14
Bombilla 
(Yesterday, 05:18 PM)quent_1982 Wrote: Thank you for a such detailed answer! I’ll test your solutions out and let you know which one works best for my project.


For test project worked set TimeStep to 1.5 and set some of joint properties:

- Mass scale = 3.5
- Connected mass scale = 0.5
Reply