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

2011/9/14

Car movement

Canning Canning

2011/9/14

#
In my current game, I am moving a car around by the standard turn and movement functions. I am wondering if there is an example of code that takes the current cars speed into consideration, and when it turns, it turns in a wider circle than if it was going slower. Kind of like a simple 2d physics engine. Is there an example of code that I can look at? thanks
AwesomeNameGuy AwesomeNameGuy

2011/9/14

#
What does your current turn function look like? Seems to me if you move the car a certain number of pixels and then turn it by a certain number of degrees every time it acts then it should automatically turn wider the faster it is going.
You need to login to post a reply.