hello all,
I'm interested in what others might have implemented to create "container" objects; i.e. a barrel you can put collision objects in that would spill out if tipped over.
I was thinking it would be cool to have a Boolean cylinder/box/etc shape that was defined by the sum or subtraction of two shapes and collision is resolved vs the resultant implicit shape.
Obviously I can make a compound object out of some boxes to define a barrel and just use that for my container, but I thought I'd just ask about what complexities might arise from a boolean shape.
Thanks,
Binofet
container collision objects
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: container collision objects
I've been discussing this approach with several people, but it is tricky.
Booleans would create concave objects, and the shortcuts/optimizations that apply to convex objects don't apply anymore. You can still try it, and create a custom collision shape (type) and collision algoritm to deal with this special case.
My best advice is to go with a btCompoundShape, with childshapes that have volume (a collection of boxes or convex hulls). Second choice is using GIMPACT, especially the new GIMPACT 0.3 has some features.
Hope this helps,
Erwin
Booleans would create concave objects, and the shortcuts/optimizations that apply to convex objects don't apply anymore. You can still try it, and create a custom collision shape (type) and collision algoritm to deal with this special case.
My best advice is to go with a btCompoundShape, with childshapes that have volume (a collection of boxes or convex hulls). Second choice is using GIMPACT, especially the new GIMPACT 0.3 has some features.
Hope this helps,
Erwin