"Containing" Bodies? #165
Unanswered
DennisSmolek
asked this question in
Q&A
Replies: 1 comment
-
Jolt currently has no way of inverting a shape (and I also don't see an easy way of implementing this as it changes convex shapes into non-convex shapes). I would suggest creating a compound of convex shapes to approximate your 'interior' or to use a mesh shape. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a few scenarios where I would like to keep bodies inside a bound area.
![surroundingShapes](https://private-user-images.githubusercontent.com/1397052/328832627-72bee751-bb69-40cd-b24d-70b327d11090.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1NjE2MDUsIm5iZiI6MTcyNDU2MTMwNSwicGF0aCI6Ii8xMzk3MDUyLzMyODgzMjYyNy03MmJlZTc1MS1iYjY5LTQwY2QtYjI0ZC03MGIzMjdkMTEwOTAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjVUMDQ0ODI1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDQ1YWNlOWU5ZTgzZTA0NzA2NjZhN2FjZWQ0YWY4YTg5MzZhM2JmOTZkNmNkMWIyNzBiN2Y2YmY0Mzc4NWI5ZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.8DoommK5Pwb46esPDd3hprdhgly-RyGwDLgtVLaMc1M)
To do this, I create 6 shapes around my inside box, or in the case of a cylinder I create my own inside shape and then add a roof/floor.
But I'm wondering if there was a way I could just use standard shapes and REVERSE the collision system to keep things INSIDE the body.
I've done this with making my own primitive physics systems but that was 2D and a long time ago.
I'm imagining a shape bouncing off the insides of a box or cylinder
![boundShapes](https://private-user-images.githubusercontent.com/1397052/328833831-163c1054-37f2-4337-8d13-c48ff5583433.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1NjE2MDUsIm5iZiI6MTcyNDU2MTMwNSwicGF0aCI6Ii8xMzk3MDUyLzMyODgzMzgzMS0xNjNjMTA1NC0zN2YyLTQzMzctOGQxMy1jNDhmZjU1ODM0MzMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjVUMDQ0ODI1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZjhhYmQ1YmQ1YWU2NDQ1NTg1NGRlOGRhYjM1ZjViYTU4MDkwYTNiZGM4M2IzZmY3YzFhYjBmYTAzOWJmMTExYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.vsTRb9IxlLjOT8MFwZEULUJUot04us4GSXAg2u5qrdA)
I'm not sure this is even possible but I figured someone might have some ideas and I would appreciate any insights.
Beta Was this translation helpful? Give feedback.
All reactions