fixed mouse select

This commit is contained in:
Ziver Koc 2007-04-04 17:32:54 +00:00
parent 88d92f1b96
commit 4627101025
2 changed files with 20 additions and 8 deletions

View file

@ -29,8 +29,8 @@ public class Map {
s.setLocation(new Vector3f(i*POS_SIZE,j*POS_SIZE,0));
s.getTexture().setTextureWidth(POS_SIZE+1.2f);
s.getTexture().setTextureHeight(POS_SIZE+1.2f);
s.getTexture().setWidth(POS_SIZE+1);
s.getTexture().setHeight(POS_SIZE+1);
s.getTexture().setWidth(POS_SIZE);
s.getTexture().setHeight(POS_SIZE);
mapNode.add(s);
}
}
@ -45,8 +45,8 @@ public class Map {
}
public Vector2i getPixelByPos(int x, int y){
x = POS_SIZE*x;
y = POS_SIZE*y;
x = (int)(POS_SIZE*x*1.2f);
y = (int)(POS_SIZE*y*1.2f);
return new Vector2i((int)x,(int)y);
}