Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Fuild pass through container Oculus Quest 2/ Hand interaction
#8
(01-03-2023, 11:30 AM)josemendez Wrote: Hi,

This is a common issue in all physics engines called tunneling: the faster the position of an object changes between consecutive frames, and the thinner/smaller objects are in relation to how fast they move, the more prone to tunneling are.
We have a video on tunneling here:
https://www.youtube.com/watch?v=ms0Z35GY6pk

You can reproduce the exact same effect using regular Unity objects. Try placing a small cube rigidbody on top of a plane, then move the plane upwards fast: the cube will simply pass trough it.

Simulation performance in the video you shared is really quite bad, not sure of the culprit. The change in position of the bucket from one frame to the next is quite large, so you're quite literally pulling the rug from under the fluid's feet. So one way to improve results would be to fix the performance issue: I assume you've installed the required dependencies for Burst, as per the installation steps?

Another option is using forces to move rigidbodies around. This allows the engine to "predict" where objects are going to move next. This is what's called CCD (continuous collision detection). However, for this to be of any use objects need to have a velocity vector, which they won't if you just do transform.position = whatever.

In the case of kinematic rigidbodies, Obi will calculate a velocity vector with a 1-frame delay (since it uses the difference in position since the last frame) which improves robustness in some situations, but can't do much when an object starts moving from a stationary state: there's no way to predict where it's going to move next.

The only way to do that is to move the object by applying forces to it. This way, the object is moved during the simulation (as opposed to after it) as a result of forces modifying its velocity, and CCD can kick in.

hope this helps,

kind regards

Hi Josemendez,

It would be better if you make your "Whiskey bottle" sample project works with the force and give us. We would look into it further.

Thanks,
Harish
Reply


Messages In This Thread
RE: Fuild pass through container Oculus Quest 2/ Hand interaction - by Harish - 01-03-2023, 01:20 PM