Loot 3 fix1: the loot-3 findings' fixtures, and the held-pose curve has one owner

PickupTests: TheBeamTakesFromWhicheverBayCanStore is a theory over which bay is full.
CapabilityPresentationSmoke: tracked ship's hull hit is drawn; a beam above the held point stays on the ground plane; a grab at the beam keeps its aim; the other entity's grab reaches its own bound beam and not this one.
FloatingItemsDrawnSmoke: a held item's label comes up; the test scene's stand-in pose equals the zone's held pose.
Zone.HeldPull is the one smoothstep of the held pose; FieldDriver's tendril and FieldTester's stand-in call it (FieldTester.PulledPosition, PullProgress), deleting the two copies.
All commits build (Unity compile and both smokes green).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-13 22:25:49 +02:00
commit a345bd3dcb
6 changed files with 109 additions and 38 deletions

View file

@ -148,22 +148,27 @@ public class FieldTester : MonoBehaviour
_capabilityEvents.PublishGrab(new GrabEvent(id, GrabPhase.Pull, _grabStart, GrabPullTime));
}
var pickup = _pickups[_grabIndex].transform;
if (_pullPublished)
pickup.position = PulledPosition(_grabStart, TestField.transform.position.ToCultMath(), _grabElapsed,
GrabExtendTime, GrabEnvelopTime, GrabPullTime).ToUnity();
if (_pullPublished && PullProgress(_grabElapsed, GrabExtendTime, GrabEnvelopTime, GrabPullTime) >= 1)
{
var progress = saturate((_grabElapsed - pullStart) / max(GrabPullTime, 1e-4f));
pickup.position = lerp(_grabStart, TestField.transform.position.ToCultMath(), smoothstep(0, 1, progress)).ToUnity();
if (progress >= 1)
{
_capabilityEvents.PublishGrab(new GrabEvent(id, GrabPhase.Completed, pickup.position.ToCultMath(), 0));
Destroy(pickup.gameObject);
var p = _pickups[_grabIndex];
p.transform = null;
_pickups[_grabIndex] = p;
_grabbing = false;
}
_capabilityEvents.PublishGrab(new GrabEvent(id, GrabPhase.Completed, pickup.position.ToCultMath(), 0));
Destroy(pickup.gameObject);
var p = _pickups[_grabIndex];
p.transform = null;
_pickups[_grabIndex] = p;
_grabbing = false;
}
}
// How far along the pull a grab is `elapsed` seconds in: 0 through Extend and Envelop, then 0..1 over the pull.
public static float PullProgress(float elapsed, float extend, float envelop, float pull) =>
saturate((elapsed - extend - envelop) / max(pull, 1e-4f));
// Where the stand-in sim holds its pickup: still through Extend and Envelop, then along Zone's held-pose curve.
public static float3 PulledPosition(float3 start, float3 holder, float elapsed, float extend, float envelop, float pull) =>
lerp(start, holder, Zone.HeldPull(PullProgress(elapsed, extend, envelop, pull)));
private void Update()
{
var move = _forceThrust ? float2(0,1) : _input.Player.Move.ReadValue<Vector2>().ToCultMath();