Draw every moving body at the drawn time T = ExactTime + Lead
Planets, belts, wells, loot, mines, stations, the chunk reticle and the flow clock are evaluated through DrawAhead (Time, Orbit, Height, Position) at one drawn time; the rail law lives once in Zone.Offset; OrbitPositionAt, GetHeight, ChunkPose, EvaluateBelt and RideHeight take a time. Fixes the planet jumping against a co-moving ship at display rates above the step rate. Not yet built or run (Unity presenter files are verified by compile only on Starfire). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
09ec04a8d5
commit
b57207045d
14 changed files with 429 additions and 62 deletions
|
|
@ -390,6 +390,9 @@ public class EntityInstance : MonoBehaviour
|
|||
x.Value.material.SetFloat("_Emission", Entity.ItemManager.GameplaySettings.TemperatureEmissionCurve.Evaluate(x.Key.RadiatorTemperature));
|
||||
}
|
||||
|
||||
// The drawn pose first: the camera's LookAt and the barrels read this frame's pose, not the last frame's.
|
||||
var drawn = DrawAhead.Position(Entity, ActionGameManager.Clock.Lead);
|
||||
LocalSpace.localPosition = transform.position = drawn.ToUnity();
|
||||
var aimDistance = !Entity.Target.Value.IsNone
|
||||
? max(Entity.TargetRange, Entity.ItemManager.GameplaySettings.ConvergenceMinimumDistance)
|
||||
: 10000;
|
||||
|
|
@ -402,8 +405,6 @@ public class EntityInstance : MonoBehaviour
|
|||
var direction = FireControl.Solution(weapon, Entity, Entity.Target.Value).Direction;
|
||||
group.Value.position = barrel + new Vector3(direction.x, 0, direction.y) * aimDistance;
|
||||
}
|
||||
var drawn = DrawAhead.Position(Entity, ActionGameManager.Clock.Lead);
|
||||
LocalSpace.localPosition = transform.position = drawn.ToUnity();
|
||||
if (_influenceInstance)
|
||||
_influenceInstance.position = new Vector3(drawn.x, 0, drawn.z);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue