Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do you simulate refraction? #608

Open
nowakf opened this issue Mar 24, 2024 · 4 comments
Open

How do you simulate refraction? #608

nowakf opened this issue Mar 24, 2024 · 4 comments

Comments

@nowakf
Copy link

nowakf commented Mar 24, 2024

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?

@wlinna
Copy link

wlinna commented Mar 25, 2024

I know nothing about refraction, but maybe someone at Dimforge Discord channel will?
https://discord.gg/vt9DJSW

Issue trackers in general are only used to discuss bugs and feature requests

@nowakf
Copy link
Author

nowakf commented Mar 25, 2024

Oh, ok. Is there any non-discord place to ask the question? Discord doesn't work on my machine.

EDIT: No luck! Don't worry then, sorry for spamming your tracker: I'll work it out.

@wlinna
Copy link

wlinna commented Mar 25, 2024

There is Stack Overflow. I don't know how popular it is compared to the Discord channel though.
https://stackoverflow.com/questions/tagged/rapier

Is there any non-discord place to ask the question? Discord doesn't work on my machine.

Interesting. I'm on Linux and it works fine on both Firefox and Chromium. Oh well.

@nowakf
Copy link
Author

nowakf commented Mar 25, 2024

My best guess is I live nextdoor to a very prolific spammer: I get mercilessly autobanned by automatically moderated platforms, even if I've previously been through the appeal process repeatedly :). It's generally no biggie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants