Rigidbody Collision Primitives Locations in Blender

Given you cannot move primitive rigid body shapes in blender and these are the objects that become the CollisionNodes in panda when you export with blend2bam. If you needed different hitbox placement, would a good strategy be to make child objects in blender in the right location, generate the primitive and then when you load the nodes in panda simply delete the geom node to save performance / get the look you want, but have the collision node at the right location. Would simply hiding it be good enough?

I’m not entirely sure, but you can export empty objects to position the collision body. But again, this assumption is based on hearsay.

1 Like

Not a bad idea! Would take a bit more tweaking to get the shape / orientation right.

You can add collision-only objects to a collection called “InvisibleCollisions” and they will not have visible geometry exported. You can change the name of this collection with the invisible-collisions-collection flag on the CLI.


You can do this in blender? Do you mind pointing me to some docs? The only way ive been able to add “collision” is through the rigidbody setting in the physics tab of an object.

Or are you saying you move the collision object with a rigidbody to a collection named InvisibleCollisions and this means something to blend2bam?

Yes, in Blender create an “InvisibleCollisions” collection and add your collision-only geometry to it. blend2bam will then pick up on this and skip creating visible geometry for anything in this collection.

1 Like

Amazing thank you. I take it this effectively does what i was going to correct in my own code and thats not to add a geom node?

Correct, there will not be a Geom node (only CollisionSolid/BulletRigidBody) for each object in the InvisibleCollisions collection.

1 Like

Amazing, works like a charm. Even works if you make the collection not visible!

Screenshot from 2023-07-11 16-21-13

Dont mind the second one, thats my hull collision created in code. I am going to make standard ship collisions probably based off the bounding box distance. (If I can figure that out!) =b

1 Like