I am quite new to using bullet solver and I am currently having an issue with a collision object clipping through a container
I have a fairly simple setup of a sphere inside a rotating rectangular box which I have set to compound with continuous collision detection turned on
The sphere collides fine with the box container when it is not rotating, but once I introduce rotation along the z axis of the container it seems to clip outside of it
I have tried switching the container to using 6 individual boxes for faces to add depth to the faces as suggested in the manual but I still have the same issue
You should be rotating it with velocity in this case. There’s a few ways to do this: the angular velocity parameter on the box actor, using feedbacking/Bullet Solver CHOP on vel_r[xyz] channels, or using a local force COMP. I recommend taking a look at the Bullet Solver’s OP Snippets if you haven’t already.
You’ll likely need to change some things about your simulation as well, since I expect the box is currently static rather than dynamic. Switching to dynamic means the collision shape can’t be concave. You can get around this by using a compound collision shape composed of convex SOPs (one for each wall of the box). Additionally, you’ll need to constrain the box in place; from the description of your simulation I think this would best be done using a hinge constraint via the Constraint COMP.
Would I have to have a separate actor for each convex SOP or could I merge them into 1 actor?
Nope, just one actor, but the convex SOPs used for the compound shape would need to be separate SOPs. In your example that would mean six separate SOPs, one for each side of the box.
Thanks so much! Thats sorted the clipping issue now!
As a follow up question,
is there any way to extract the rotation values of the container now that its being controlled by angular velocity rather than the transform? I was originally using the transform value to drive a real-world stepper motor so that it would sync up to the simulation but now am unable translate the rotational value of the container to degrees
I’ve tried using an info chop but to no avail