fix(title-3d): naus rotades cap al VP, alçada mínima, eix X de càmera corregit
This commit is contained in:
@@ -49,10 +49,12 @@ namespace Graphics {
|
||||
void Camera3D::recomputeBasis() {
|
||||
// Forward = del position cap al target.
|
||||
forward_ = (target_ - position_).normalized();
|
||||
// Right = forward × up_world. Cau a (1,0,0) si forward ≈ up_world.
|
||||
right_ = forward_.cross(up_world_).normalized();
|
||||
// Up real ortogonal = right × forward.
|
||||
up_ = right_.cross(forward_).normalized();
|
||||
// Right = up_world × forward (convenció right-handed amb Y up,
|
||||
// mirant cap a +Z → right cau a +X). L'invers (forward × up_world)
|
||||
// donava la base mirall i invertia l'eix X de la projecció.
|
||||
right_ = up_world_.cross(forward_).normalized();
|
||||
// Up ortogonal real = forward × right (manté la mà dreta).
|
||||
up_ = forward_.cross(right_).normalized();
|
||||
}
|
||||
|
||||
void Camera3D::recomputeFocal() {
|
||||
|
||||
Reference in New Issue
Block a user