Currently trying to move a sprite between two points and making it stop between those two points on mouseclick/tap. Cant figure out how to do that (Script isnt laying on the object that is being moved btw)
void Update() {
if(isMoving){
Vector3 v = startingPos;
v.x += distanceToCover * Mathf.Sin(Time.time * triangleSpeed);
transform.position = v;
}
if(Input.GetMouseButtonDown(1)){
}
}