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

Compound physics bodies not supported #55

Open
Clockwork-Muse opened this issue Feb 5, 2021 · 3 comments
Open

Compound physics bodies not supported #55

Clockwork-Muse opened this issue Feb 5, 2021 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Clockwork-Muse
Copy link
Contributor

Blender 2.91+ supports compound physics bodies:
image

During blender sim:
image

... but the converter doesn't recognize the type:

Unknown collision shape (COMPOUND) for object (Cube)
Could not create collision shape for object (Cube)

Panda node tree:

ModelRoot Scene T:(pos 0 -2 1) S:(LightAttrib)
  PandaNode Cube
    GeomNode Cube (1 geoms: S:(CullFaceAttrib MaterialAttrib TextureAttrib))
    PandaNode Cube.001 T:m(pos 0.225866 0 0)
      BulletRigidBodyNode Cube.001 (1 shapes) active mass=1
        GeomNode Cube.001 (1 geoms: S:(MaterialAttrib TextureAttrib))
    PandaNode Torus T:m(pos 0 0.207598 0)
      BulletRigidBodyNode Torus (1 shapes) active mass=1
        GeomNode Torus (1 geoms: S:(MaterialAttrib TextureAttrib))

... and because of that, the object falls apart:
image

Sample blender file

@rdb
Copy link
Contributor

rdb commented Feb 5, 2021

For the record, in Panda, a compound shape is made by simply attaching multiple CollisionSolid objects to the same CollisionNode, so it should be supportable.

@Moguri Moguri added enhancement New feature or request good first issue Good for newcomers labels Feb 5, 2021
@Moguri
Copy link
Owner

Moguri commented Feb 5, 2021

Compound shapes are also supported by the glTF extension being used for collision shapes. In other words, this should be a pretty straightforward add. However, both blend2bam and panda3d-gltf would need to be updated.

@Clockwork-Muse
Copy link
Contributor Author

For the record, in Panda, a compound shape is made by simply attaching multiple CollisionSolid objects to the same CollisionNode, so it should be supportable.

I'm aware (and of the way to do it in Bullet), but it means I have to write the code to do it until the exporters are updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants