Hey guys,
I’m having a problem with some bit of code that is supposed to return mouse position relative to the main Camera. This code works except when the camera is zooming in (i believe that is when the zoom value is less than 1). Here is the code:
mx = ((MouseInput.GetX() - camera.viewportWidth/2) + camera.position.x);
my = ((camera.viewportHeight / 2 + MouseInput.GetY()) + camera.position.y);
PS: This code is only used when selecting game items that are relative to the camera. For Gui I use different Mouse Coordiantes