Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Obi Fluid - Tunnelling
#1
Hey guys,

I'm using Obi Fluid to fill glasses which are made out of a collection of primitive colliders, and then moving the glass (full of Obi fluid) using Physics.

My issue is that when I move things too fast I experience Tunnelling - and I'm wondering if you know how to move fast objects with Physics without Tunnelling?

Things I've tried so far:

- Moving a Kinematic Object with Rigidbody.MovePosition.
- Moving a non-kinematic object with a FixedJoint attached to a Kinematic Object moving with with Rigidbody.MovePosition.

I got it work when using Rigidbody.AddForce - and this makes sense since it's updating the velocity which is obviously what the particles read from to simulate their position.

What I'm not clear on is why the same wouldn't be true for a Kinematic Object using Rigidbody.MovePosition, as this also internally updates the rigidbody.velocity.

Is there something I'm doing wrong, and do you know of a way to fix the tunnelling issue while using Kinematic RB.MovePosition?

Thanks for all your help,

Tim
Reply
#2
(20-08-2019, 05:27 PM)TimLewis Wrote: What I'm not clear on is why the same wouldn't be true for a Kinematic Object using Rigidbody.MovePosition, as this also internally updates the rigidbody.velocity.

Well, it doesn't for kinematic rigidbodies. It updates the internal interpolation state, but that's all. rigidbody.velocity will still be zero when using MovePosition.

The ObiKinematicVelocity component does differentiate both angular and linear velocities from position/orientation for kinematic RBs. Use that instead.
Reply
#3
This makes a lot of sense! I've been working under a misunderstanding for a long time.

Thanks Jose, awesome as always!
Reply