18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-03 15:55:27 +01:00
Files
maj00r 6ab8ce52c6 feat(physics): the gradient of the track against the vertical at the vehicle, the body of the world at run time
Step 5 of docs/world-format-eu07.md (section 6): the physics takes the vertical from the body the world is set on,
not from the y axis. world_geometry::current_body() is the plane unless a world on a curved body is loaded (none
is yet), and track_gradient() gives the gradient under a vehicle: on the plane exactly -vFront.y, as the physics
has always had it, on a curved body minus the share of vFront along the normal of the ellipsoid at the vehicle.
One vertical per segment wouldn't do: it turns by 0.157 mrad per kilometre, 0.16 per mille at the ends of a
segment of 2 km. TDynamicObject::updateTrackParameters takes the gradient from it.

The cant, the height of the wire, the camera and the particles need the same vertical; they come from the
geometry of the track and of the image, and follow with the sphere in the renderer (step 4).

Checked in the game (--test 120 s, seed 1): the physics logs of td.scn and Glinojeck.scn the same bit for bit as
before. Tests: the gradient on the plane is -front.y to the bit, on the Earth 1 per mille against the vertical
at the equator, level against the local vertical 1 km north where the vertical of the start would show 0.157
per mille.
2026-12-03 02:48:08 +01:00
..