Home Game Development unity – Smoothing transition between Animator and script managed character

unity – Smoothing transition between Animator and script managed character

0
unity – Smoothing transition between Animator and script managed character

[ad_1]

I’ve a NPC which has a strict match logic (bot participant), and I’m transferring it on FixedUpdate(),
However, on sure occasions within the recreation I’m activating animations that are managed by the Animator – animations that aren’t very possible to script.

So, after I allow the Animator, the place of my character “jumps” to the animation body place, which causes a really jittery/unsmooth conduct.
In order to maneuver between the animations themselves, I exploit Animator.Crossfade which works nice, however doesn’t work on the primary animation I play after I allow the Animator.

I’m looking for a technique to clean the transition, e.g. utilizing MoveTowards() to the primary body place of the animation proper earlier than it begins taking part in, however I could not discover any workaround that solves this case.

Here’s an instance of the character and the positions – the character has 3 Rigidbodies that I’m transferring independently.

Origin place when transferring with FixedUpdate() (no Animator enabled):
enter image description here

Animation 1st body place:
enter image description here

P.S: Try setting the animation first body to the (roughly) final FixedUpdate() cycle just isn’t actually an choice, because the place is topic to alter, considerably.

Any concepts or methods of implementation can be extremely appreciated.

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here