Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 8 tip: Enemies stuck on Walking Animation (Wander script) #17

Open
gabeux opened this issue Nov 5, 2019 · 1 comment
Open

Comments

@gabeux
Copy link

gabeux commented Nov 5, 2019

Hello there. Loving the book!

This is similar to #14 .
Since it took me about an hour and led me to debug, read Coroutine docs, triple check code, double check math..I'll just leave this here.
Make sure the Enemy Spawn Point (or any objects, really) has a Transform Z-axis 0.

On my end, the Enemy Animator isWalking bool was always True, and was never set to False. This was due to the enemy spawn point being in Z -1, which would never allow the Move method to work correctly, leaving Wandering enemies stuck on the Walking animation.
I had the same issue with the coin, as per #14

Thanks folks!

E: Here's a gif showing my newly-created GameObjects start with a Z-axis value of over -2. It caused me a bunch of weird issues, not sure why it does that by default! (sorry for the horrid quality, forgot Github doesn't like Mp4)
ezgif com-video-to-gif

@ngoc-dao
Copy link

thanks for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants