Hi
How can I smooth animation transitions that are controlled via NC. In particular I’m using ‘look at’ actions but am unsure how to smooth out the resultant animation rather than model simply snapping to new look position. Have looked at decorating action but cannot find anything suitable.
Any ideas much appreciated.
Hi,
If I were you I’d just create a new Action that every time it’s run it will increment some value by a step and do Lerp (or Slerp if the value is an angle) between current and target vectors. Or maybe just specify MaxAngle that your action can turn and then check angle between these two vectors and if the angle is greater than MaxAngle then only rotate by MaxAngle.
If you really don’t like writing your own actions I think that you could create a GameObject that your LookAt action will have and then write a custom script that would move this GameObject towards the actual target. Problem is that the GameObject should move on a sphere (circle) around the character, so you’d still have to do the Slerp part.
Just some simple ideas how you can try to do that if I correctly understood your question. Maybe someone more experienced in NodeCanvas know how to do it using built-in NC actions and decorators.