0

I'm working on a car drift game, which I want to make skid marks with using the pen.

I created a circle, radius 25 around the car that I am using as a reference for where the tires would be, and I need to get the tire sprite to follow the back end of car according to its rotation. I'm trying to adapt the formulas x'= xcosθ−ysinθ, y'= xsinθ+ycosθ but I don't know how to do it.

I set the initial x value as 0 and the y value as -25, but I know this is wrong because it doesn't stay the same when the car is moved and rotated.

Here is my project: https://scratch.mit.edu/projects/535410396/

1 Answers1

0

I got the solution from a user of the Scratch Forums. For the x value:

CarX-25*sin(CarRotation)

For the y value:

CarY-25*cos(CarRotation)