Enemy shaking

When enemy start shooting that after few shots it is just started shaking and stuck between Get in range and not in range like behavior. Is there anything wrong with my coroutine setup?

Hi,

Have you already compared your code to the Lecture Project Changes which can be found in the Resources of this lecture? Unless the particle system has got colliders attached, the player should not get stuck because of it. Comment out StartCoroutine and play your game again to figure out if the problem is indeed caused by your coroutine.

HI Nina,

It’s really good to see you are still here because of your help here I was able to pass the beginner level came a long way now you are doing excellent for the developers :slight_smile: .

For the topic I have solved this problem it was a rigid body issue and I was stopping the coroutine unnecessarily so that worked fine now.

I don’t know If I can ask different question here but if you can see the code of my AI controller I am disablling the navMesh when the enemy is Dead but getting this error

The the relevant piece of code

image

It is understandable that when enemy die than the nav mesh would be disable but there was no error when they did the same in lectures.

Have you already tried to add Debug.Logs to your code to see what is going on during runtime? Maybe the reason for the error message is Unity’s (random) code execution order.

It has been solved. I was by mistake using it on two scripts my bad.

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

Privacy & Terms