mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
corrected minimap coordinate placement
This commit is contained in:
+2
-2
@@ -20,8 +20,8 @@ namespace battleship{
|
||||
|
||||
void MinimapButton::onClick(){
|
||||
Vector2 clickPos = getCursorPos();
|
||||
float posXRatio = 1. - (clickPos.x - pos.x) / size.x;
|
||||
float posYRatio = 1. - (clickPos.y - pos.y) / size.y;
|
||||
float posXRatio = (clickPos.x - pos.x) / size.x;
|
||||
float posYRatio = (clickPos.y - pos.y) / size.y;
|
||||
|
||||
Camera *cam = Root::getSingleton()->getCamera();
|
||||
Vector3 mapSize = Map::getSingleton()->getMapSize();
|
||||
|
||||
Reference in New Issue
Block a user