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

2013/12/11

Limit the movement of an actor

Aaron91 Aaron91

2013/12/11

#
I got a world wich is 760x760x1.. and i want to limit the actors movement to y400-760 x760.. as if y500 is the edge.. how could i pull this 1 off? still trying to figure greenfoot at the moment.. thanks in advance.
danpost danpost

2013/12/11

#
This is just a matter of doing what you want: if the value of the coordinate is below the lower limit, set it to that lower limit; and, if the value of the coordinate is above the upper limit, set it to that upper limit
You need to login to post a reply.