I’m having the problem that is said in the title and have no idea why it’s happening. This is the code that i believe is causing the problem. There’s gotta be something weird going on with it.
public void moveTo(double x, double y){
double x1 = pos.x;
double y1 = pos.y;
lastPos.x = x1;
lastPos.y = y1;
if(map.get((int)x,(int) y).walkable){
this.pos.x = x;
this.pos.y = y;
}
}