The compound body hits the static body when it should be missing it.
If the parent of the compound body is not rotated, then the physics body is correct. No collision occurs.
If using cannon, everything works fine.
If using ammo, the mesh is rotated correctly, but the physics body is not.
If using oimo, both the mesh and physics body are not rotated correctly.
It’s quite hard to debug this, as the inspector does not show the physics body of the child, and I don’t know of any ways to determine the dimensions/rotation/position of the child physics body except by interaction with other objects.
878 var extendSize = impostor.getObjectExtendSize();
…the extendSize takes into consideration the parent’s rotation. This is incorrect, as parent’s rotation are ignored when adding the child into the compound shape.
I’m afraid I’m not sufficiently familiar with the physics code to know how best to fix this. Modifying getObjectExtendSize to ignore parent’s rotation would likely break other things. Perhaps reversing the parent’s rotation in _tmpAmmoTransform would work.
This is there to explain that the physics engines convert your rotation to quaternions so don’t use .rotation after setting a physics impostor. I do agree however that you can understand this sentence a bit differently
This is certainly a bug, and it seems like the extent size change is the way to go. There was a reason why we decided to use extendSizeWorld, so I will have to see when what should be used. The logic is clear thou
Want to report an issue on github so we can follow this? Link this thread as well when filing it.