0

I have written some code to move a tank to specific point. First I've made a wall stick and programmed it to find out when the tank moves to the bottom-left. The tank's coordinate is (18,18), but when I use getWidth() and getHeight() function it returns the tank's width and height - which is (40, 40).

I think when the tank moves to the bottom-left, the coordinate should be (getWidth()/2, getHeight()/2). What am I doing wrong here?

4444
  • 3,541
  • 10
  • 32
  • 43
if_
  • 13
  • 4

0 Answers0