A drawn ship rides the field at its drawn xz
DrawAhead moved xz ahead but carried the last step's y, so on a slope the ship's height stepped once per sim tick. Entity.RideHeight is the one owner of 'an unparented entity sits on the field'; the step and DrawAhead both call it. A child is drawn where its parent is drawn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8f491fd3c9
commit
105f0270eb
4 changed files with 40 additions and 8 deletions
|
|
@ -1770,7 +1770,6 @@ public abstract class Entity
|
|||
|
||||
var velocityBefore = Velocity;
|
||||
LimitClamp = float2(0, 0);
|
||||
var hullData = ItemManager.GetData(Hull) as HullData;
|
||||
|
||||
// Mining Cut 3: a chunk target is lost the moment this entity can no longer see it -- the lost-track rule
|
||||
// through the chunk path. One check of the one slot per tick, not a detection loop over chunks.
|
||||
|
|
@ -1890,12 +1889,16 @@ public abstract class Entity
|
|||
Position = Parent.Position;
|
||||
Velocity = Parent.Velocity;
|
||||
}
|
||||
else Position.y = Zone.GetHeight(Position.xz) + hullData.GridOffset;
|
||||
else Position.y = RideHeight(Position.xz);
|
||||
|
||||
Acceleration = delta > 0f ? (Velocity + LimitClamp - velocityBefore) / delta : float2(0, 0);
|
||||
Manoeuvre.Observe(Acceleration, delta, ItemManager.GameplaySettings.SolutionWindow);
|
||||
}
|
||||
|
||||
// Where an unparented entity sits on the field at a planar point: the zone's height there plus the hull's grid offset.
|
||||
// The step puts the entity here at its own xz, and the presenter at its drawn xz (DrawAhead).
|
||||
public float RideHeight(float2 planar) => Zone.GetHeight(planar) + (ItemManager.GetData(Hull) as HullData).GridOffset;
|
||||
|
||||
private void UpdateTemperature(float delta)
|
||||
{
|
||||
var hullData = ItemManager.GetData(Hull) as HullData;
|
||||
|
|
|
|||
Loading…
Reference in a new issue