How can I used the distance variable to keep enemies from running into certain environmental assets? I can't seem to get it to work!
Develop games in your browser. Powerful, performant & highly capable.
Not sure how your looking to apply it, but distance works like:
this gives the ditstance between a and b
Applying it could be something like
distance(a.X,a.Y,b.X,b.Y) < 100
action: stop moving
That's actually perfect, and seems to be working great now! Thanks alot!