public struct BuoyancyStateWhat the last fixed step did to a floating body.
As a scene component
- Size
- 20 bytes — 512 rows in a 16 KB chunk, alone on the archetype
Remarks
A readout and not an input. BuoyancySystem writes it every step and nothing reads it to decide anything — which is exactly why it exists: a boat that sits too low, launches out of the lake or drifts sideways is a bug with no visible cause, and these five numbers are the difference between "buoyancy is broken" and "two of four pontoons are dry".
⚠ Unmanaged, so a debug draw can walk it as a span — the per-pontoon forces are deliberately not here. Those are Forces' scratch, live for the step that produced them, and copying them into a component would be an array per body per step for a picture nobody is usually looking at.
Fields and properties (6)
public int WetHow many pontoons touched water on the last step.
public int TotalHow many there are in total.
public float SubmergedThe mean submerged fraction over every pontoon, 0…1.
public float LiftThe total upward force applied last step, in newtons.
public float SurfaceHeightWhere the surface was over the body's origin, in world units.
public readonly bool IsFloatingWhether any part of it is in water at all.
Used by (10)
- BuoyancyDebugDrawVixen.Water.Physics
- BuoyancyDebugDrawTestsVixen.Water.Physics.Tests
- BuoyancySystemVixen.Water.Physics
- BuoyancySystemTestsVixen.Water.Physics.Tests
- ComponentRegistrationVixen.Water.Physics
- TypeRegistrationVixen.Water.Physics
- Vixen_Water_Physics_BuoyancyStateSerializerVixen.Water.Physics
- MaterialIconsVixen.Editor.App
- SceneWaterComponentTestsVixen.Editor.Assets.Tests
- WaterSceneRunsTestsVixen.Editor.Assets.Tests