I have a typical parallax backgrounds. They are scrolling by
public float Speed=0f;
void Update ()
{
renderer.material.mainTextureOffset = new Vector2 (Time.time*Speed,0);
}
I have a character. OnKeyDown he starts to move: Speed of background sets to 0.4f for example. OnKeyUp a character stops by setting the speed of background 0f. The problem is: when backgrounds stop to scroll, they return to its start position. They must just to pause the position. How to do?