I’ve animated the angle variable of the twirl effect using the animation view guide. It distorts to one side and then the other, which is what I want. Now I want to increase the distortion depending on how far away the player is from a certain spot- the home base. How should I go about doing this?
Animations always “take over” the control of the animated value (position / rotation / or a script value) because it always sets the value to an absolute value. However you still can affect the value but you have to decide what’s the better solution in your case:
Use LateUpdate() to modify the value. Modify means you just scale the actual value instead of setting it to a new value. In LateUpdate all animation components have applied their values for thi frame and you can “overwrite” the value as you need it.
For a single value animation you can use an AnimationCurve and sample it yourself in Update, scale / modify the sampled value and assign it yourself.