X
X
xawifoo2019-03-06 21:10:24
Algorithms
xawifoo, 2019-03-06 21:10:24

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
5c800b79e144a050017134.png
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
5c800c2e3add9924554857.png
. 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

1 answer(s)
A
Armenian Radio, 2019-03-06
@gbg

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 question

Ask a Question

731 491 924 answers to any question