Presenters read the drawn pose: HUD markers, wells, rounds, ping, shield hit, compass, loot view, guided aim
HUD target, lock, incoming-lock, bearing and sweep markers anchor on DrawAhead.Position / AtBearing at Clock.Lead. GravityLowering's record fill is DrawAhead.Well (pure, pinned at non-zero lead). Rounds take DrawAhead.Time instead of float Zone.Time + lead. Sensor ping, shield hit, compass icons, wormhole bearing, loot ViewOrigin and the guided-projectile aim read the drawn pose. Not built in Unity yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
6c865b2cc9
commit
2cb1e83353
10 changed files with 121 additions and 35 deletions
|
|
@ -50,13 +50,13 @@ public static class GravityLowering
|
|||
if (zone != null)
|
||||
foreach (var body in zone.PlanetInstances.Values)
|
||||
{
|
||||
var at = DrawAhead.Orbit(zone, body.BodyData.Orbit.Key, lead);
|
||||
var well = DrawAhead.Well(zone, body, lead);
|
||||
_records[i++] = new WellRecord
|
||||
{
|
||||
Position = new Vector2(at.x, at.y),
|
||||
Strength = body.WellStrength,
|
||||
CoreRadius = body.RocheLimit,
|
||||
Reference = zone.WellReference(body)
|
||||
Position = new Vector2(well.Position.x, well.Position.y),
|
||||
Strength = well.Strength,
|
||||
CoreRadius = well.CoreRadius,
|
||||
Reference = well.Reference
|
||||
};
|
||||
}
|
||||
wells.SetData(_records);
|
||||
|
|
|
|||
|
|
@ -524,7 +524,7 @@ public class ZoneRenderer : MonoBehaviour
|
|||
GravityLowering.Lower(Zone, lead, ref _gravityWells);
|
||||
foreach (var loot in _floatingItems.Values)
|
||||
{
|
||||
loot.ViewOrigin = PerspectiveEntity.Position;
|
||||
loot.ViewOrigin = DrawAhead.Position(PerspectiveEntity, lead);
|
||||
loot.ViewDirection = PerspectiveEntity.Aim;
|
||||
}
|
||||
|
||||
|
|
@ -601,7 +601,7 @@ public class ZoneRenderer : MonoBehaviour
|
|||
{
|
||||
if(entityInstance.CompassIcon)
|
||||
{
|
||||
var difference = entityInstance.Entity.Position.xz - PerspectiveEntity.Position.xz;
|
||||
var difference = DrawAhead.Position(entityInstance.Entity, lead).xz - DrawAhead.Position(PerspectiveEntity, lead).xz;
|
||||
var distance = length(difference);
|
||||
|
||||
entityInstance.CompassIcon.gameObject.SetActive(
|
||||
|
|
@ -613,7 +613,7 @@ public class ZoneRenderer : MonoBehaviour
|
|||
|
||||
foreach (var wormhole in WormholeInstances.Values)
|
||||
{
|
||||
var difference = wormhole.gravity.transform.position.Flatland() - PerspectiveEntity.Position.xz.ToUnity();
|
||||
var difference = wormhole.gravity.transform.position.Flatland() - DrawAhead.Position(PerspectiveEntity, lead).xz.ToUnity();
|
||||
var distance = difference.magnitude;
|
||||
wormhole.icon.gameObject.SetActive(distance > _minimapDistance);
|
||||
wormhole.icon.transform.rotation = Quaternion.Euler(0, 0, Mathf.Atan2(difference.y, difference.x) * Mathf.Rad2Deg - 90);
|
||||
|
|
|
|||
Loading…
Reference in a new issue