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

2016/10/21

Moving an actor with a mouse click

Justinh Justinh

2016/10/21

#
I want to move an actor with a mouse click while keeping the image of the actor vertical, no matter where I click I want it to move there with a vertical image.
Super_Hippo Super_Hippo

2016/10/21

#
Do it step by step. Check for a mouse click and save the x and y position of the mouse in the actor. Use the turnTowards method (to the saved x and y), move and set the rotation back to 0.
You need to login to post a reply.