Vibrating enemies!!!

Do this: use a cooldown timer. Until the timer runs down, don’t choose a new spot. Here’s more:

Cooldown timers, gun bullet intervals, shot spacing, rate of fire:

https://discussions.unity.com/t/821482/2

GunHeat (gunheat) spawning shooting rate of fire:

https://discussions.unity.com/t/824570/2

It’s a little weird and inconsistent… Random.Range(int,int) returns from the first to the last minus one. But Random.Range(float,float) will return everything up to and including each end number… but getting that is EXTREMELY unlikely.

EDIT: as Brath points out below, note that Random.Range(float,float) can return any fractional decimal number between the high and low, inclusive. That’s why hitting high or low is vanishingly unlikely, because there’s a MASSIVE number of possible fractional numbers between -5.0f and +5.0f, eg, such as 3.1415926f…