I have a tween position script attached to a bar that basically follows the color on the color wheel that you've selected. All it's supposed to do is slide up and down, I got it to work earlier with Mathf.Lerp but I've decided to take the NGUI approach and just change the To and From Vectors when each color is pressed. The bar goes to the right position but it doesn't animate, it's instant. I can't seem to figure out why, the time is set properly and so is the curve. What could be causing this?
Here's the code:
//Slide the selector bar
TweenPosition tp = colorScrollSpy.GetComponent<TweenPosition>();
Vector3 tempVec = GameObject.Find(currentColor).gameObject.transform.localPosition;
Vector3 currentVec = colorScrollSpy.transform.localPosition;
tp.from = currentVec;
tp
.to = new Vector3
(currentVec
.x, tempVec
.y, currentVec
.z);
tp.duration = 0.5f;
tp.PlayForward();