I am making a game where a knife goes from point A to B and loops that, but when the knife’s speed increases (it increases when scored +1) it glitches to random location on the axis between A and B, when it should just keep moving from same position with higher speed. Ask me more if you need to know and thanks for trying to help me!
void Update ()
{
transform.position = Vector3.Lerp(pos1, pos2, (Mathf.Sin(speed * Time.time) + 1.0f) / 2.0f);
}