Skip to content

How to move colliders #267

Description

@kentbarber

I can't seem to get colliders moving and interacting with the fluid how I expect it to.

I have a LevelSetLiquid that is half full with fluid. I then move a sphere in from outside of the domain that slowly moves through it.

I am moving it by setting the transform of the colliders Surface3.

surf->transform.setOrientation(jet::QuaternionD(quat.w, -quat.v.x, -quat.v.y, -quat.v.z));
surf->transform.setTranslation(jet::Vector3D(p.x, p.y, p.z));

But I think I may need to add velocity to the RigidBody as well, but I tried adding linearvelocity to it but it doesn't seem to work.

What happens is I see some slight affect on the fluid as the sphere moves in. But I am expecting the sphere to completely push the entire fluid, which it doesn't.

I will try to get another gif to you later today to demonstrate the issue, but if you are able to provide an example where I could manually set the location of objects before the solver->update method is called that would be great. I am not using your callback system due to the way my code is structured.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions