Vixen
caa30e12
csharp
public sealed class BuoyancyDebugDraw

`water.showBuoyancy`: pontoons, how far under they are, and the forces as arrows.

Read the guide page for this →

Remarks

[35 § Part 2 § Debugging](../../docs/plan/35-water.md#debugging)'s sixth verb, and the only one of the six that is not in Vixen.Rendering.Water. The pontoons and the forces are this assembly's, and the renderer must not reference it — § D1 puts the physics join in its own assembly precisely so that nothing linking Jolt is linked by a renderer. So the flag lives with the console verb and the drawing lives with the data.

⚠ Enabled rather than reading WaterDebug.ShowBuoyancy, and the copy is the price of the split. A host that wants the verb wired sets this from that flag once a frame; one line, and it is what keeps this assembly linkable by a dedicated server that has no renderer at all.

⚠ It draws what the last step did, which is why it is worth having at all. A boat that sits too low, launches out of the lake or drifts sideways is a bug with no visible cause; four spheres, their submerged fractions and their force arrows are the difference between "buoyancy is broken" and "two of four pontoons are dry".

Fields and properties (2)

  • public bool Enabled

    Whether to draw anything. A host copies WaterDebug.ShowBuoyancy into it.

  • public float ForceScale

    How many metres an arrow one body-weight of force draws.

Methods (1)

Used by (1)

  • BuoyancyDebugDrawTestsVixen.Water.Physics.Tests