// Update is called once per frame void Update() { if (biDirectional) { moverTransform.localEulerAngles = oscillator.Evaluate(startRotation - magnitude, startRotation + magnitude); } else { moverTransform.localEulerAngles = oscillator.Evaluate(startRotation, startRotation + magnitude); } }
// Update is called once per frame void Update() { Vector3 targetScale = originalScale; targetScale.Scale(magnitude); moverTransform.localScale = oscillator.Evaluate(originalScale, targetScale); }
// Update is called once per frame void Update() { Vector3 newPos; if (biDirectional) { newPos = oscillator.Evaluate(startPos - magnitude, startPos + magnitude); } else { newPos = oscillator.Evaluate(startPos, startPos + magnitude); } if (localMotion) { moverTransform.localPosition = newPos; } else { moverTransform.position = newPos; } }