Transform.foward

First off great tutorial!!! I tried changing the direction of the character on my own before seeing how you did it; I used quaternion lookRotation; but your way is a lot easier. I was wondering if it wouldn’t be better to set the IsWalking animator function to true in the if statement that checks to see if the mouse is clicked, because it only need to be set once per button click instead of continuously being update while the character is walking?

1 Like

Sure, technically it would be more performant to just set the animator state once instead of every frame, you just need to keep track of when the character starts and stops moving.

However that performance “boost” would be in the order of microseconds, so while it would technically be faster, it’s probably not worth it the extra code complexity. But if you want to, sure it’s a viable option.

1 Like

Yeah, you’re right; I some times can be a little nit-picky about the small stuff. Anyways, I am learning a lot from your course and look forward to learning as much as I can from you.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms