voxelcore/src/data
ostermine cb39ed464a use double precision for positions of entities and players
Transform::pos, Hitbox::position and Player::position were floats. At
65k blocks the float step is 8 mm, at 1M it is 6-12 cm, at 30M it is
2 m. The physics moves a body by 3 cm or less per substep and pushes it
out of a wall by 10 cm or less: steps got rounded to the grid (the body
changed its speed, then stopped), the AABB of a body was off by a float
step and gave false collisions with the blocks around.

Positions of bodies, entity transforms, players, spawn points and the
skeleton position interpolation are worldvec3 now. Collisions are still
calculated in floats, but in the coordinates relative to the block the
body is in: the solver takes the origin, block lookups and hitboxes of
other bodies are shifted by it, the result is added back in doubles.
So the precision of the physics is the same anywhere in the world.

A calculated sensor is stored relative to the position of its entity.
Entities::getAllInside takes the corners in doubles,
Entities::hasBlockingInside takes the origin of the AABB.

The save format does not change: positions are written as numbers
(float64) as before, saves are compatible in both directions. Lua
functions keep their signatures, they only stop rounding to float.
2026-11-12 10:05:07 +03:00
..
dv.cpp add dv::merge & update EnginePaths::readCombinedObject 2025-02-20 22:08:09 +03:00
dv.hpp test environment (sky) 2026-05-12 02:02:06 +03:00
dv_fwd.hpp reduce extra includes 2025-04-02 14:55:53 +03:00
dv_util.hpp use double precision for positions of entities and players 2026-11-12 10:05:07 +03:00
setting.cpp update project includes format 2024-08-10 01:37:48 +03:00
setting.hpp update ContentGfxCache 2025-07-24 22:51:53 +03:00
StructLayout.cpp reduce extra includes 2025-04-02 14:55:53 +03:00
StructLayout.hpp add EnumMetadata 2025-04-13 13:53:59 +03:00