Skip to content

How do you simulate refraction? #608

Description

@nowakf

Say you want to simulate a lens, so you shoot a ball into a region, you don't want to reflect it off the surface, but rather, refract it.

I tried to do this using PhysicsHooks::modify_solver_contacts, but I couldn't work it out.

The other approach would be to have the lens work as a sensor, then just manually set the velocities of colliders entering it.

Is there a correct way here?

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions