Obi Official Forum
Help Dynamic Attachment Often Displaced - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Help Dynamic Attachment Often Displaced (/thread-4322.html)



Dynamic Attachment Often Displaced - vrtraining - 07-08-2024

Hi,

Its my 3rd post but I'm having some troubles since the upgrade so I'll be really glad if anyone can help me out.
My dynamic rope attachment since the upgrade often gets displaced from actual position 8 out of 10 times. Like a little offset above and then it sticks to it for the rest of the scene. At start the hook with all four chains is like below in image. All four corner hinge hooks have rigidbody and they are attached with chain (obi rope). As the hooks fall down due to gravity at start the chains also fall.

[Image: S.png]

The next image is expected behaviour that usually happens 80% of the time.

[Image: 1.jpg]

But problem is some times it is displaced a little as it falls down (I tried holding it still for 1 second before turning on its gravity so that it can bind itself as correct position but it didnt worked). Next image shows the problem.

[Image: image.jpg]

Now it uses the wrong position as attachment and as I lift the hook the chains are not attached to hooks anymore, But a little higher.


RE: Dynamic Attachment Often Displaced - josemendez - 07-08-2024

Hi,

Attachments haven't changed at all in Obi 7 , they should behave the same as in Obi 6.
Could you share a small project/scene that reproduces this by sending it to support(at)virtualmethodstudio.com so that we can take a closer look?

kind regards


RE: Dynamic Attachment Often Displaced - vrtraining - 07-08-2024

(07-08-2024, 08:13 AM)josemendez Wrote: Hi,

Attachments haven't changed at all in Obi 7 , they should behave the same as in Obi 6.
Could you share a small project/scene that reproduces this by sending it to support(at)virtualmethodstudio.com so that we can take a closer look?

kind regards

Hi,

Thank you for response. But strange thing is, its only happening in VR runtime, sometimes alrite and sometimes out of place. In editor its almost not happening like I have only see it once out of 100 times. Is there any reason it could happen? or anyways to detect and fix it if it happens? Pin Constraints or anything related to that?

I will try to create a small project to reproduce it but its only happening in VR mostly

You explained in another post about physics in Obi 7

Quote:As a result there may be more than one physics update during which Obi doesn't react to the rigidbody simulation immediately, but compensates for it later in the same frame. In the case of a rigidbody hanging from a rope, this means the rigidbody may fall due to gravity for more than 1 physics step, and the rope will later apply a larger force to get the rigidbody back to its position. 


Could this be the reason? because hooks are rigidbodies attached dynamically and they fall due to gravity along with Obi Rope. But if number of steps are different for rope then more gravity could displace the initial hook binding position?


RE: Dynamic Attachment Often Displaced - vrtraining - 07-08-2024

(07-08-2024, 08:13 AM)josemendez Wrote: Hi,

Attachments haven't changed at all in Obi 7 , they should behave the same as in Obi 6.
Could you share a small project/scene that reproduces this by sending it to support(at)virtualmethodstudio.com so that we can take a closer look?

kind regards

I tried it but its very hard to reproduce in editor, its happening in VR because of low performance may be as compare to a powerful Unity editor on system. But is there any way to detect and stick it back to its point? or could be multiple physics update in OBI 7 causing this?


RE: Dynamic Attachment Often Displaced - josemendez - 07-08-2024

(07-08-2024, 10:59 AM)vrtraining Wrote: I tried it but its very hard to reproduce in editor, its happening in VR because of low performance may be as compare to a powerful Unity editor on system.

If this is a performance thing, you could just cap the framerate in editor or increase the physics timestep? Sounds like the rigidbodies are being updated several times (and falling) before the rope has a chance to.

Are these attachments created in-editor, or procedurally in some way?

In any case, sharing the project will allow me to take a deeper look and identify potential issues easier (even if the actual problem doesn't happen in editor).

(07-08-2024, 10:59 AM)vrtraining Wrote: But is there any way to detect and stick it back to its point?

You could just force the position of the particle to be a specific one, instead of relying on the attachment picking it up upon being enabled. There's sample code for this in the manual:
http://obi.virtualmethodstudio.com/manual/7.0/scriptingattachments.html


RE: Dynamic Attachment Often Displaced - vrtraining - 07-08-2024

(07-08-2024, 11:23 AM)josemendez Wrote: If this is a performance thing, you could just cap the framerate in editor or increase the physics timestep? Sounds like the rigidbodies are being updated several times (and falling) before the rope has a chance to.

Are these attachments created in-editor, or procedurally in some way?

In any case, sharing the project will allow me to take a deeper look and identify potential issues easier (even if the actual problem doesn't happen in editor).

Okay I'll try to reproduce in editor or try to share it. Its actually more than 18 Gigs, I'll try to strip it so it can be shared easily