Hi folks.
I have a couple of AI that have to do a bit of thinking, not every frame, but every few random seconds. Wheh they’re thinking I get a frame rate loss which is very noticeable.
These AI aren’t doing a great deal of thinking, most of it is very simple vector math, but I am relying on Vector2.Distance and Vector2.Length quite a bit. Are these two functions particularly overhead heavy?
How do you guys work with distances, are there any tricks for keeping the processing low?
Thanks.