Yo @trevordev and @Deltakosh
Can you please look at this playground: https://playground.babylonjs.com/#66PS52#15
It more closes follows the scenario using exported GLTF content from the new Babylon Toolkit.
// NOTE: Compound Root Parent Child Order Is Authored In Scene File
// The Box and Sphere Colliders Are Already Children Of Compound Root
// 1... The Compound Root position in world is authored at 0, 5, 0 (Starting Drop Point)
// 2... The Sphere Collider local child position is authored at 0, 0.08, 0 (Like Skull Demo)
// 3... The Box Collider local child position is authored at 0, -0.13, -0.13 (Like Skull Demo)
// 4... The Box Collider get converted to 0, -0.13, 0.13 (Left To Right Handed Conversion)
// 5... GLTF Flips Everything. All geometry in inside __root__ with negative z scaling.
But the center of mass seems off plus how can i control the center of mass for already authored meshes. If you run it a few times you see it fall and LAND on the box part only. But if center of mass is ZERO that should NOT happen. The sphere should make it tip over.
Why don’t we just have a center of mass field or something like that so we don’t have to use the POSITION of the compound root in the world as the center of mass BEFORE the child nodes are added. It seems like it HAS TO temporarily FAKE the compound root position. Then add children then set position back to authored or what ever your desired position is. i think that is what is going on. But i still get funny result when using position ZERO.
Can you please take a look at what i am trying to do in a playground using a Test Physics Scene authored with my new Babylon Toolkit
// PLEASE HELP WITH ISSUES:
// 1... I MUST set the entity mesh parent to null before calling entity.physicsImpostor = new BABYLON.PhysicsImpostor or it wont work at all
// 2... I MUST use the AUTHORED entities. These entities have metadata and scripts attached. I cannot create new ones at runtime.
// 3... The CENTER OF MASS seems wrong. I do not know if that is because how the items are serialized in GLTF Loading or what
// 4... Need to be able to change CENTER OF MASS. Be able to specify the center of mass at top of head like your other skull demo