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

2019/1/29

Turn towards mouse help

343qwm29 343qwm29

2019/1/29

#
I just cant figure out how to make an actor turn toward the mouse, I have no code at all yet. Can somebody please help?
Claw76 Claw76

2019/1/30

#
turnTowards(Greenfoot.getMouseInfo().getX(), Greenfoot.getMouseInfo().getY());
Hey 343qwm29, I hope this line of code will help you... A little hint: When you don't know how to do something, but you have an idea what your code has to do, go to your Greenfoot Scenario and click on "Help" and then on "Greenfoot Class Documentation" where you can find almost every method that Greenfoot has, and how to use it.
You need to login to post a reply.