Commit graph

1 commit

Author SHA1 Message Date
ostermine
e1f6daabb7 fix camera view rotation far from the world origin
Camera::getView built the view with lookAt(position, position + front):
the direction came back as a difference of large floats. Far from the
origin the view turned away from where the camera looks - at 16M blocks
by up to 24 degrees, at 30M the camera looked straight up or down
whatever its yaw (at pitch 0 the direction is a zero vector, the matrix
is NaN). The rotation is built from front itself now, then translated
by -position: the same matrix, without the subtraction.
2026-11-12 10:05:05 +03:00