-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
In this homework we will solve the problem of turning objects in the direction of movement. Grab the mover class from here.
_Description:_
Use the arrow keys to apply a force to your mover object. Left arrow will push the mover to the left, up arrow pushes up, and so on. Use the rotate()
function to turn the object in the direction of movement. Use velocity.heading()
to calculate theta, or the movement angle. Below are some code examples that will help out. Take a look at this link for keyCode
reference.
This image shows an alternate way of setting up the checkEdges()
function.
This image shows how to implement one button in your code.