also this scaling needs to go the other way too now

This commit is contained in:
Gered 2014-04-27 22:35:46 -04:00
parent 6e446ac83d
commit f65be66c1a

View file

@ -95,8 +95,8 @@ public final class GraphicsHelpers {
viewportContext.getPerspectiveViewport().project(result);
// screen coordinates will be unscaled, need to apply appropriate scaling
result.x /= viewportContext.getOrthographicViewport().getUnitsPerPixel();
result.y /= viewportContext.getOrthographicViewport().getUnitsPerPixel();
result.x *= viewportContext.getOrthographicViewport().getUnitsPerPixel();
result.y *= viewportContext.getOrthographicViewport().getUnitsPerPixel();
// now center them on the bounds given
result.x -= (width / 2.0f);