Skip to content

core(kotlin): absorbR has no BodySpec path, so sink and warp are stuck at the default throat #1177

Description

@zachshallbetter

Found while porting warp pairing (#1175). Pre-existing and shared between forces, so it was deliberately not widened there.

The gap

absorbR — the capture radius — is a Body field that no BodySpec parameter can set on Kotlin. JS types it explicitly (packages/core/src/engine/types.ts:303). A Kotlin consumer holding a BodyHandle therefore gets whatever the default is (10px) and has no way to change it.

It affects every force that keys off capture radius:

  • sink — the capture radius is the force's whole behaviour.
  • warp — the throat size, and it also scales where matter emerges (absorbR · scale + 6).

The engine's own tests work around it by reaching past the public API: FieldHandleTests goes through handle.body.absorbR directly, which is the same shape of workaround that hid the warp gap for as long as it did — a test proving something the public API cannot express.

Suggested fix

Add absorbR to BodySpec, defaulted so no existing call site changes, in the same way #1175 added twistDeg and warpScale. Then update the tests that currently reach through handle.body to go through the spec, so the workaround stops masking the gap.

Worth checking whether Swift has the same hole before fixing, so the three planes move together rather than Kotlin alone.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidAndroid / Kotlin portbugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions