This site requires JavaScript, please enable it in your browser!
Greenfoot back
LakeOtis
LakeOtis wrote ...

2017/2/1

Just curious, why does Greenfoot.setLocation(getX(), getY()+1) make it go down?

LakeOtis LakeOtis

2017/2/1

#
And vice versa. Is it some sort of glitch, or does it only happen on my computer? (I don't have a problem with it, just curious)
Super_Hippo Super_Hippo

2017/2/1

#
(0,0) is the top left corner, so +x is right and +y is down. This is no bug and happens to everyone (unless you overwrite the methods).
BrownDwarf BrownDwarf

2017/2/1

#
Basically what Super_Hippo said. The Y-Values increase as you move down from the Origin (Top Left Corner). Therefore adding one speeds up this process, and moves it down further. And Vice Versa.
davmac davmac

2017/2/1

#
Actually, I'm curious what you expect this to do? (Did you mean you would expect it to cause an actor to move up)?
LakeOtis LakeOtis

2017/2/3

#
davmac wrote...
Actually, I'm curious what you expect this to do? (Did you mean you would expect it to cause an actor to move up)?
Yes, I thought that adding to the 'y' variable would make it move up and vice versa.
You need to login to post a reply.