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

Objects falling out of borders #1025

Closed
22092 opened this issue Jun 23, 2021 · 1 comment
Closed

Objects falling out of borders #1025

22092 opened this issue Jun 23, 2021 · 1 comment

Comments

@22092
Copy link

22092 commented Jun 23, 2021

https://codepen.io/celsowhite/pen/XWbEzpx

I found this project and want to use it in my website, but the problem is when I push it very hard, it can fall out of the boundary, I want to know how to prevent it from never falling out of the boundary?

test.mp4
@ghost
Copy link

ghost commented Jun 23, 2021

Thats likely because there is no CCD (see #5). Your options are:

  1. Limit the max speed of objects
  2. Make the border walls thicker. You would have to move them outwards as well to prevent it from affecting the inner space
  3. Use raycasts
  4. Check if objects are out of bounds and teleport them back inside

@22092 22092 closed this as completed Jun 24, 2021
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