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

2017/5/23

Check if something is next to the main.

Trystar360 Trystar360

2017/5/23

#
is there a way to check if an actor is next to another actor and what side its on (front back left or right)
Super_Hippo Super_Hippo

2017/5/23

#
There is the 'getOneObjectAtOffset' method. You can check if another actor is a given amount of pixels in x/y-directions away. You could also move some amount to the side and use the 'isTouching' method (and then move back to the original position). That would probably be the easiest way.
You need to login to post a reply.