Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  How to grab obi cloth in XRI?
#1
I am using Unity 2022.3.8f1 and Obi Cloth version 7.0. In my project, I am working with XRI version 3.0 and want to grab Obi Cloth in VR using XRI.
I have found a script called ObiContactGrabber.cs, and I added a Sphere Collider and Obi Collider component to the Left Hand.

To achieve a natural grabbing interaction with Obi Cloth using XRI, should I write an additional script to make ObiContactGrabber.cs work? Or is there a specific way to integrate Obi Cloth with XRI for grabbing interactions?
Reply
#2
Hi,

It's entirely up to you and how you want to handle interaction. 

Obi does not have any built-in integration with XRI or any other input system, instead it exposes an API that allows you to detect collisions between particles and colliders/triggers, and an API that allows you to read/write particle properties such as position, velocity, orientation, etc.

These are often used together to deal with particle interaction, by for instance detecting when a particle is inside a trigger and then setting its position. Many of the included sample scripts (including ObiContactGrabber, ObiParticlePicker, and more) use them. You can write your own interaction logic using these APIs as they offer the most flexibility.

If you'd prefer not to write any code, you could for instance add a ObiForceZone to your hands and use them to attract particles towards you, pull them away, etc.

kind regards,
Reply
#3
I have assigned the Box Collider, Obi Collider, Obi Contact Grabber, and XR Direct Interactor components to the hand. I also connected the ObiContactGrabber script based on Hover events, as shown in the attached image.

However, when Hover Entered and Exited events occur, there’s a slight delay that causes a choppy effect.

Is there a way to eliminate this delay and make the Unity playback smoother?


Attached Files Thumbnail(s)
   
Reply
#4
(05-12-2024, 08:10 AM)eunjilim Wrote: I have assigned the Box Collider, Obi Collider, Obi Contact Grabber, and XR Direct Interactor components to the hand. I also connected the ObiContactGrabber script based on Hover events, as shown in the attached image.

However, when Hover Entered and Exited events occur, there’s a slight delay that causes a choppy effect.

Is there a way to eliminate this delay and make the Unity playback smoother?

Hi,

Not entirely sure what you're talking about, Hover events are triggered in response to an interaction hovering over an interactable, this should be instant. Could you share a video of the effect?

kind regards,
Reply