Skip to content

Commit 1efca93

Browse files
committed
What is wrong with me
1 parent 427c769 commit 1efca93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

3Dev/src/Camera.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ rp3d::Vector3 Camera::ScreenPositionToWorld(bool useMousePos, const rp3d::Vector
170170
}
171171
else screenPos = toglm(screen);
172172

173-
screenPos.x = ((screenPos.x * 2.0) / float(viewportSize.x)) - 1.5;
174-
screenPos.y = -(((screenPos.y * 2.0) / float(viewportSize.y)) - 1.5);
173+
screenPos.x = ((screenPos.x * 2.0) / float(viewportSize.x)) - 1.0;
174+
screenPos.y = -(((screenPos.y * 2.0) / float(viewportSize.y)) - 1.0);
175175

176176
glm::vec4 clipPos = glm::vec4(screenPos.x, screenPos.y, -1.0, 1.0);
177177
clipPos = glm::inverse(m->GetProjection()) * clipPos;

0 commit comments

Comments
 (0)