Bullet + Blender + COLLADA + compound objects = bug?

Post Reply
User avatar
gennoevus
Posts: 39
Joined: Sun Oct 10, 2010 4:39 am

Bullet + Blender + COLLADA + compound objects = bug?

Post by gennoevus »

Hello!

I'm not sure if I'm making some mistake or if I've found a bug. I really hope it's the former!

Let's say I'm exporting a 2x2 rigid body cube and a 0.8x0.8 rigid body cube from blender 2.49b using the COLLADA 1.4 exporter plugin (0.3.162)

When I export, and I look inside the *.dae, I find this:

Code: Select all

<shape>
    <box>
        <half_extents>1.00000 1.00000 1.00000</half_extents>
    </box>
</shape>

...

<shape>
    <box>
        <half_extents>0.40000 0.40000 0.40000</half_extents>
    </box>
</shape>
... which is correct as far as I can see. But! If I make a compound object of these two shapes, they:
a) both get the same 'half_extent' dimentions (i.e. they both say <half_extents>0.40000 0.40000 0.40000</half_extents> when the size of the boxes hasn't changed)
b) there doesn't seem to be anything in the XML that describes the parent/child relationship between the 2 boxes.

Code: Select all

<library_physics_models>
        <physics_model id="Scene-PhysicsModel" name="Scene-PhysicsModel">
            <rigid_body name="Plane-RigidBody" sid="Plane-RigidBody">
                <technique_common>
                    <dynamic>false</dynamic>
                    <mass>0</mass>
                    <instance_physics_material url="#Plane-PhysicsMaterial"/>
                    <shape>
                        <instance_geometry url="#Plane_001"/>
                    </shape>
                </technique_common>
            </rigid_body>
            <rigid_body name="Cube_001-RigidBody" sid="Cube_001-RigidBody">
                <technique_common>
                    <dynamic>true</dynamic>
                    <mass>1.0</mass>
                    <instance_physics_material url="#Cube_001-PhysicsMaterial"/>
                    <shape>
                        <box>
                            <half_extents>0.40000 0.40000 0.40000</half_extents>
                        </box>
                    </shape>
                </technique_common>
            </rigid_body>
            <rigid_body name="Cube-RigidBody" sid="Cube-RigidBody">
                <technique_common>
                    <dynamic>true</dynamic>
                    <mass>1.0</mass>
                    <instance_physics_material url="#Cube-PhysicsMaterial"/>
                    <shape>
                        <box>
                            <half_extents>0.40000 0.40000 0.40000</half_extents>
                        </box>
                    </shape>
                </technique_common>
            </rigid_body>
        </physics_model>
    </library_physics_models>
    <library_physics_scenes>
        <physics_scene id="Scene-Physics" name="Scene-Physics">
            <instance_physics_model url="#Scene-PhysicsModel">
                <instance_rigid_body body="Plane-RigidBody" target="#Plane"/>
                <instance_rigid_body body="Cube_001-RigidBody" target="#Cube_001"/>
                <instance_rigid_body body="Cube-RigidBody" target="#Cube"/>
            </instance_physics_model>
        </physics_scene>
    </library_physics_scenes>
The settings should be right because it behaves correctly when using the blender game engine.

Any ideas?
Post Reply