up down is broken
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user