Hope someone can help with this. I’m trying to have my line renderer follow the same path as my debug.drawline. I’m using the same vector set with line renderer WorldSpace box unchecked, but for some reason the line always moves up the same magnitude as the object the line renderer is attached to on the y axis. Pic attached for clarity. The green line is the debug.drawline, the pink is the line renderer, the box has the script attached to it.

void DrawPath()
{
LaunchData launchData = CalculateLaunchData();
previousDrawPoint = ball.transform.position;
int resolution = 50;
for (int i = 1; i <= resolution; i++)
{
float simulationTime = i / (float)resolution * launchData.timeToTarget;
Vector3 displacement = launchData.initialVelocity * simulationTime + ball.transform.up * gravity * simulationTime * simulationTime / 2f;
drawPoint = ball.transform.position + displacement;
Debug.DrawLine(previousDrawPoint, drawPoint, Color.green);
//LineRenderer
lr.enabled = true;
lr.positionCount = resolution + 1;
lr.SetPosition(i, drawPoint);
previousDrawPoint = drawPoint;
}
}

