Isometric Shooter - Ai following

Here’s a gif of what I have currently

As you can see the cow rotates for movement. I have a very limited knowledge for Unity even though I’m at University, so I found the code online for the enemy movement but it isn’t exactly what I want. How can I go about changing the code so the cow doesn’t rotate but still moves in the direction.

I’m not entirely sure how to go about changing the sprite for the movement either, kind of like how don’t starve does theirs.

Also I think the camera is slightly off but I’m not sure, if you could give feedback about it that would be great.

The code I used is here

In your MoveTowards function you have this code:

//rotate toward or away from the target
               
                transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(direction), rotationSpeed * Time.deltaTime);
               
                transform.eulerAngles = new Vector3(0, transform.eulerAngles.y, 0);

Looks like this is rotating the cow towards the target, I’m guessing you’ll just need to remove this part.

I also noticed further down that you’re using this:

direction = forward * speed * speedModifier;

Your cows direction is based on going forward which will not work without the rotation.

So you may need to adjust this to make the cow move directly to the players position instead.

Hope this helps, good luck!