Fixed the move thing. The units moves to the right pixel now
This commit is contained in:
parent
59a7b0299f
commit
5d07cd2dee
1 changed files with 3 additions and 3 deletions
|
|
@ -52,9 +52,9 @@ public class Map {
|
|||
* @param y y pos
|
||||
* @return The coordinate of the pos
|
||||
*/
|
||||
public Vector2f getPixelByPos(float x, float y){
|
||||
x = (int)(POS_SIZE*x*1.2f);
|
||||
y = (int)(POS_SIZE*y*1.2f);
|
||||
public Vector2f getPixelByPos(int x, int y){
|
||||
x = (int)(POS_SIZE*x);
|
||||
y = (int)(POS_SIZE*y);
|
||||
return new Vector2f((int)x,(int)y);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue