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

2015/1/16

getOneObjectAtOffset....

DemonsWhiteSoul DemonsWhiteSoul

2015/1/16

#
How would i create solid objects, would i need to use the getOneObjectAtOffset?? or is there another way?
danpost danpost

2015/1/16

#
The easiest way is to use the 'isTouching' method:
if (isTouching(ActorSubclassName.class)) /** move back */
If you save the distances moved along both the horizontal and vertical or save the initial location of the actor, moving back can be done easily.
DemonsWhiteSoul DemonsWhiteSoul

2015/1/18

#
So how would i make the Actor stop when its Touching the wall for example?
danpost danpost

2015/1/18

#
DemonsWhiteSoul wrote...
So how would i make the Actor stop when its Touching the wall for example?
if (!isTouching(ActorSubclassName.class)) /** move */
DemonsWhiteSoul DemonsWhiteSoul

2015/1/18

#
Thanks, you been soooo much help xD
You need to login to post a reply.