fix: enable collision pairs, correct physics shape sizes, lower floor

- ObjectLayerPairFilterTable blocks all collisions by default in C# binding;
  explicitly EnableCollision for all layer pairs (NonMoving/Moving)
- BoxShape takes half-extents, not full size: DynamicBox(scale * 0.5f)
- Floor visual thickness reduced (scale Y 1→0.5), top at y=0 matching collider
- Floor lowered to y=-0.5
- Physics works: cubes and spheres fall and land on floor, no clipping
This commit is contained in:
emil28092005
2026-06-17 17:31:17 +03:00
parent 4a5893dc61
commit a9d8af48e5
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -46,6 +46,11 @@ public sealed class PhysicsWorld : IDisposable
_broadPhaseLayerInterface.MapObjectToBroadPhaseLayer(Layers.Moving, new BroadPhaseLayer(1));
_objectLayerPairFilter = new ObjectLayerPairFilterTable(2);
// Explicitly enable all collision pairs
_objectLayerPairFilter.EnableCollision(Layers.NonMoving, Layers.NonMoving);
_objectLayerPairFilter.EnableCollision(Layers.NonMoving, Layers.Moving);
_objectLayerPairFilter.EnableCollision(Layers.Moving, Layers.NonMoving);
_objectLayerPairFilter.EnableCollision(Layers.Moving, Layers.Moving);
_objectVsBroadPhaseLayerFilter = new ObjectVsBroadPhaseLayerFilterTable(
_broadPhaseLayerInterface, 2, _objectLayerPairFilter, 2);