Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Water Tunneling Through Mug When Grabbed in VR (Unity 6.3+Obi 7.1.1+XR Interaction)
#1
I'm working on a VR application where players need to fill a mug with water and pour it onto trees. I'm running into an issue with the Obi fluid behaviour when the mug is grabbed.

Current Setup:
- Unity 6.3
- Obi 7.1.1
- XR Interaction Toolkit

What's Working:
- The mug fills with water correctly
- The player can grab and move the mug using XR Interaction Toolkit


The Problem:
When the player grabs the mug, the water starts tunneling through the container instead of staying inside and moving with the mug.

Video link: Tunneling issue link


Questions:
1. Is there a specific way to configure the Obi Collider or Obi Solver when using XR grabbable objects?
2. Do I need to adjust the rigidbody settings on the mug when it's grabbed?
3. Are there any known compatibility issues between Obi Fluid and XR Interaction Toolkit's grab mechanics?
Reply
#2
Hi!

Make sure that the mug rigidbody is moved via MovePosition(), AddForce, .velocity, or any other method that modifies the rigid body's velocity.

XRGrabInteractable allows you to choose which method to use via its Movement Type property, you should use "Velocity Tracking". Using "Instantaneous" (the default) won't work as it directly sets the transform position, disregarding any physics simulation.

Also make sure that the mass of the rigidbody is higher than the mass of each fluid particle, otherwise the mug won't be able to impart large enough forces on the fluid to keep it inside.

kind regards,
Reply