up down is broken

This commit is contained in:
2026-02-13 13:00:22 +01:00
parent 5cd6abdd48
commit 0c1541e98c
8 changed files with 147 additions and 7 deletions
+5 -3
View File
@@ -33,12 +33,14 @@ DeltaVector2 DeltaCamera::projectPointVec(const DeltaVector3 &worldPos) {
// pitch translate
calculatedPos.y = calculatedPos.y * cosineY - calculatedPos.z * sineY;
calculatedPos.z = calculatedPos.y * sineY + calculatedPos.z * cosineY;
float tempY = calculatedPos.y, tempZ = calculatedPos.z;
calculatedPos.y = tempY * cosineY - tempZ * sineY;
calculatedPos.z = tempY * sineY + tempZ * cosineY;
// dont touch calculatedPos.x
projected.x = calculatedPos.x * FOCAL / calculatedPos.y + SIMULATED_WIDTH / 2;
projected.y = calculatedPos.y * FOCAL / calculatedPos.y + SIMULATED_HEIGHT / 2;
projected.y = calculatedPos.z * FOCAL / calculatedPos.y + SIMULATED_HEIGHT / 2;
// now gotta convert y to our y
projected.y = SIMULATED_HEIGHT - projected.y;