Hey there! Hope that you are doing well.
My question is that, in video number; 169. Rotate to face Target, we have used this function for rotation of enemy towards player :
So my question is, can we use LookAt method in place of this whole big function as compared to LookAt method?
I’m asking this because LookAt method does the same work as the FaceTarget method and I’m concerned about it, whether it will give me any errors in future or not.
In many cases, there are multiple ways to make something work in Unity, and Rick cannot show all of them. If your code works, it’s a solution by definition.
Don’t worry about future errors. You are not a clairvoyant, neither are we. When Rick writes his code, he cannot know if an error will occur in the future because of this code. If an error occurs, he will fix it. Do the same. You obviously did research, and you appear to be knowing what you are doing. And if that’s true, I don’t see any reason why you should not use your alternative solution.