I need an ai engine.
ackvonhuelioLvl 41
- Edited
- Best Answerset by pluto
to find the direction(angle) between two points:
var angle = atan2(target.y-subject.y,target.x-subject.x);
to have the subject move at that angle:
subject.x += cos(angle)*speed;
subject.y += sin(angle)*speed;
personLvl 62
stretch the collider into a big circle around the sprite, then anything inside the collider shall be tracked with sprite.istouching
if there are several sprites in this circle, make a second, smaller circle
ackvonhuelioLvl 41
person
that's...
an interesting idea
personLvl 62
nobody has to know how it works they just play the game
personLvl 62
its kinda a stupid idea tho
ackvonhuelioLvl 41
it would be really laggy also
- Windows
ackvonhuelio Actually you can make multiple sprites and then set the sprites containing the extra colliders to invisble. Then you can merge the main sprite and the extras into a group and you won't have to worry