Answer the question
In order to leave comments, you need to log in
How to correctly implement the passage of the car on the road?
Hello!
I am just starting my acquaintance with c# and I have a task ahead of me.
Task:
Implement the passage of the car through the block.
The quarter itself: The
conditional car (black element) should move exactly in the middle of the road and turn around corners.
A road is 5 pictureboxes that are connected to each other.
When the car reaches the end of the road, it must turn to the center of another picture box
. I'm not asking you to write the code for me. It's just a little mess in my head and I don't understand how to correctly implement the movement and rotation of the car to another picturebox.
1. How would it be correct to implement a rotation to the middle of another pictruebox?
2. How to correctly determine the coordinates when it is necessary to turn?
3. How to implement a conditional car driving in the center of the road?
I would be very grateful for any advice and help on implementation!
Answer the question
In order to leave comments, you need to log in
The main thing to remember is that the car does not turn around its center, but around the center of the turn, which is the center of the circle on which the track from the car falls. Then the turn will look natural
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question