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

Collision between two boxes #628

Open
Dmitry-Sedov opened this issue Oct 24, 2024 · 0 comments
Open

Collision between two boxes #628

Dmitry-Sedov opened this issue Oct 24, 2024 · 0 comments

Comments

@Dmitry-Sedov
Copy link

Dmitry-Sedov commented Oct 24, 2024

I added two collided boxes: 1) the first box is [0.0,0.0,0.0] - [1.0, 1.0, 1.0] 2) the second box is [0.0,0.8,0.0] - [1.0, 1.0, 1.0]. As you can see the second box is completely in the first one and all vertices of the second box are on the sides of the first box. Anyway, for this case the function collide returns penetration value = 1.0. But if we change original boxes like this 1) the first box is [0.0,0.0,0.0] - [1.0, 1.0, 2.0] 2) the second box is [0.0,0.8,0.0] - [1.0, 1.0, 2.0] (we scale them along Z) then "collide" returns penetration = 0. The same value will be if we scale them along Y. My question is how can I detect collisions where one body is completely inside another one and is there solid method to take the maximum penetration depth?

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