csharp
public sealed class PhysicsDebugDrawSystemDraws the scene's colliders and contacts into a DebugDraw.
No guide page documents this yet — the page shows what the code says about itself.
As a system
- Phase
- PreRender
- Reads
- PhysicsBody
- Runs after
- PhysicsInterpolationSystem
Remarks
In PreRender and after the interpolation pass, so a collider is drawn where the body is rather than where the smoothed transform says — which is the whole point of a physics overlay. The two disagree by up to one step, and when they do, the one being investigated is the body.
Off by default. The overlay is a few thousand lines for a modest scene and there is no cost at all to a system whose Enabled is .
Fields and properties (3)
public bool EnabledWhether the overlay is drawn at all.
public PhysicsDebugOverlay OverlayWhat is drawn.
public SystemAccess AccessWhat this system reads and writes.
Methods (2)
public PhysicsDebugDrawSystem(PhysicsScene scene, DebugDraw draw)Draws the scene's colliders and contacts into a DebugDraw.
public override JobHandle Update(in SystemContext context, JobHandle dependency)Runs the system.
Used by (1)
- PhysicsSceneTestsVixen.Physics.Tests