22-09-2020, 07:12 AM
(22-09-2020, 03:29 AM)julienrobert Wrote: Hello
I think I have a conflict between the movement of my container and the fluidĀ inside because I'm getting a kind of stutter when I move the container. Please see video.
https://youtu.be/e_W4O8sMdEk
How can I solve this? Do I need to move the container using fixedUpdate? or something like that?
Hi,
Even if you move your container in FixedUpdate() (which is the obvious thing to do, as it's interacting with physics), you'd still get some stuttering as the physics engine can only react to movement after it has happened.
The ideal solution is to make the container a rigidbody and use torques to rotate it. This way, the collision detection system can work with the container's angular velocity to predict its movement and act accordingly.