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

Is it possible to set restitution on objects? #336

Open
fionchadd opened this issue Feb 22, 2024 · 0 comments
Open

Is it possible to set restitution on objects? #336

fionchadd opened this issue Feb 22, 2024 · 0 comments

Comments

@fionchadd
Copy link

I'm working on a thing at the moment that I want to eventually be like rolling a ball around a pool table.

I've got some of the way there, but when I move the sphere and it hits a wall, it just stays there.

I was wondering if there's a way to set restitution on objects like in matter.js for example? Or whether I need to detect the collision event and try and write the physics myself?

I've looked through various documentation but I'm struggling to find anything.

My codepen here if it's helpful: https://codepen.io/fionchadd/pen/JjzVNOe/4ba15559a770ceda5d9eee881c244b04

Thanks!
Hannah

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

1 participant