Skip to content

v0.1.0-preview.6

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 29 Oct 11:07
· 99 commits to main since this release
  • Fix: 0.1.0-preview.5 could refuse a snapshot of a valid 3D world. Its Restore rejected saved contact impulses above a fixed plausibility limit, but the solver can legitimately produce larger ones (a very heavy body on a light one, or a tight pile, gave impulses in the trillions). A world that had stepped normally could therefore write a snapshot that the same library then refused with SnapshotFormatException, which breaks a host's rollback. This release removes that check, and the wheel and engine speed limits added with it: a snapshot the library wrote always restores, and saved impulses are checked only for being finite. A damaged snapshot that carries an enormous impulse restores, and the next step reports the flung body with BodyOutOfBoundsException (the world unchanged), as before. No step result moves: world hashes and snapshot bytes are the same as in preview.5 for the same inputs.
  • 3D Restore refuses a dynamic body whose saved extents do not match its shapes (SnapshotFormatException, world unchanged). A snapshot the library wrote always matches.
  • 3D steps are faster, with identical results. Pairs whose contacts are unchanged skip the serial write-back; the tree update tests boxes in parallel; height-field collision visits only the cells a box covers; a convex shape stays loaded across the triangles of a mesh; overlap counts no longer collect hits; solver batches precompute their contents once per step. Height-field worlds step about 1.1–1.2× faster and large piles at eight threads about 1.1×. No result moves.
  • Vehicles: a step can no longer write state its own snapshot reader refuses. Fuzzing found a differential ratio of about 3e37 (finite, so accepted) that overflowed the drivetrain into NaN in one step. Vehicle definitions now bound their ratios (at most 1000), inertias (0.001 to 1e6), engine torque, clutch strength, tyre factors and low speed, and AddVehicle and Restore refuse values outside the bounds with the usual argument and snapshot errors. The step also keeps engine and wheel speeds finite, and Restore checks them against what a step can write. Valid worlds are unchanged.
  • Tests now check, after every step of every fuzz scenario (2D and 3D), that the world's snapshot restores into a fresh world and re-serializes to the same bytes.