Vapour clouds are drawn as fog banks: one ZoneRenderer subscription, VapourCloudInstance presenter, DrawAhead for a free body
ZoneRenderer loads and subscribes Zone.Clouds like mines and destroys a bank on removal; VapourCloudInstance places a Fog Patch brush at DrawAhead.Position(cloud.Body, Lead) and thins its _Depth with OpacityAt. The prefab and scene wiring follow in the next commit; this one compiles but CloudPrefab is unassigned. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b6262467f0
commit
f1c36b4ccb
4 changed files with 101 additions and 0 deletions
|
|
@ -19,6 +19,10 @@ public static class DrawAhead
|
|||
? entity.Position
|
||||
: entity.Position + float3(entity.Velocity.x, 0, entity.Velocity.y) * lead;
|
||||
|
||||
// A free body (a vapour cloud) drawn where the frame falls lead sim seconds after the last step, by the velocity
|
||||
// that step moved it with: the launch velocity and the drift together.
|
||||
public static float2 Position(KinematicBody body, float lead) => body.Position + body.TotalVelocity * lead;
|
||||
|
||||
// The ship's rotation turned about its own up axis by the rate its last step turned, for lead seconds.
|
||||
public static quaternion Rotation(Ship ship, float lead) =>
|
||||
ship.WormholeAnimationInProgress ? ship.Rotation : Turned(ship.Rotation, ship.TurnRate * lead);
|
||||
|
|
|
|||
Loading…
Reference in a new issue