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
|
|
@ -77,7 +77,11 @@ public class GuidedProjectileManager : InstantWeaponEffectManager
|
|||
p.Velocity = barrel.forward * weapon.Velocity;
|
||||
p.Thrust = item.Evaluate(MunitionParts.Of<MunitionThrusterData>(item).Acceleration);
|
||||
p.TopSpeed = item.Evaluate(MunitionParts.Of<MunitionThrusterData>(item).MaxSpeed);
|
||||
p.TargetPosition = () => (source.Entity.Position + length(source.LookAtPoint.position.ToCultMath() - source.Entity.Position) * source.Entity.Aim).ToUnity();
|
||||
p.TargetPosition = () =>
|
||||
{
|
||||
var drawn = DrawAhead.Position(source.Entity, ActionGameManager.Clock.Lead);
|
||||
return (drawn + length(source.LookAtPoint.position.ToCultMath() - drawn) * source.Entity.Aim).ToUnity();
|
||||
};
|
||||
Bind(p, source.Entity.Zone, shotId);
|
||||
}
|
||||
else Debug.LogError($"Weapon {item.Data.Name} linked to {name} effect, but is not a Launcher!");
|
||||
|
|
|
|||
|
|
@ -50,8 +50,9 @@ public class Projectile : MonoBehaviour
|
|||
private void Draw()
|
||||
{
|
||||
var lead = ActionGameManager.Clock.Lead;
|
||||
transform.position = V(DrawAhead.Round(_shot, _known, _barrel, BlendTime, _zone.Time, lead));
|
||||
if (DrawAhead.RoundOver(_shot, _known, _zone.Time, lead)) Finish();
|
||||
var drawn = DrawAhead.Time(_zone, lead);
|
||||
transform.position = V(DrawAhead.Round(_shot, _known, _barrel, BlendTime, drawn, lead));
|
||||
if (DrawAhead.RoundOver(_shot, _known, drawn)) Finish();
|
||||
}
|
||||
|
||||
// The sim's commit: the record it holds now (a contact burst's arrival is shortened here) and what it decided.
|
||||
|
|
|
|||
Loading…
Reference in a new issue