Hello! My name is Alex and i want to was a question. i’ ve been doing a race game the previous 2 days and i got to a serious problem. I have the menus, the track and a car, i made the car move.In the first place it’s horisontal with the track and then there is a turn, thant is 315 degrees. But how can i make it rotate to 315 degrees and continue moving, but with different texture of the car, like rotated to 315 degrees when i press “e”? This is my example:
You might need to enclose this transformation within a push/pull matrix call to preserve your geometry state.
If this does not answer your question, consider providing a minimum running snippet showing your current approach.
You haven’t shared that code, or told us how it works. You have only shared a single if statement.
You might want to share your complete sketch here. Use the </> button to format the code after pasting it.
My guess is that you don’t have a background(192) line at the top of your draw(), so all the old cars are still showing on the surface. Use background to wipe the sketch each frame, like an animation. Don’t use background to leave everything you draw behind, like drawing with pencil on paper (drawing more cars doesn’t remove the old cars).