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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user