Answer:
Longshore currents are formed when a wave arrives in a coastline and the wave produces a blast of energy. This is how the current is generated.
Explanation:
When the wave is approaching the beach, there are some segments of the wave that arrive at the beach at first. In this way, the wave tries to take the form of the common shape's coastline.
The waves usually do not get to the shoreline ideally but they arrive with a little angle, this process is considered as the “angle of wave approach". Waves velocity and angle usually affect the Longshore currents.