How to animate a line like a sine wave?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By anbarasu chinna

I want a line to animate like a sine wave. I tries using collection of KinematicBody2D node to achieve but the result was unexpected. How to achieve this. Am I using the wrong node or is there any other approach would help to give the better result? Thanks in advance?