I am currently having trouble with my enemy AI Script. I am currently new to Unity, so I am still learning a lot, but when my player moves and my enemy follows the player, The enemy starts to jitter and I have yet to find a solution to this tiny problem.
Here are the things I've tried out:
I have
Cinemachineattached to my player camera follow so I thought it might be that so I changed theUpdatemethod andBlendUpdatemethod toSmartUpdateandLateUpdate.I tried interpolating the Rigidbody 2d on my enemy character, but it did nothing.
I tried coding the smoothing, (changed
updatetofixedupdateonVector2.MoveTowards).I tried searching for multiple different tutorials and tried all of them.
I looked at forums on the internet but they had outdated answers or no answer, or it was the wrong game engine.
I've been stuck on this problem for 2 weeks already and I feel like I can't move forward with development if I haven't figured this out. I removed my enemy follow script for now. I read in one of the forums that they may be animating on two different clocks, which I understand yet don't understand how to fix, so please do help!