Hello, I wanted to know how could i make an enemy AI which only purpose would be to dodge bullets. I don’t really have ANY idea of how it could be done as i kinda am a newbie to godot.
Take this problem apart into smaller pieces.
As @PyramidSeph suggested, first try to just detect when a bullet enters the Area2D shape.
Then, you can e.g. take the velocity of the bullet, rotate it ± 90 degrees and move your enemy in that direction. This direction will be perpendicular to the bullet’s path, so it will look like your enemy is dodging the bullet.
Try to implement these pieces one by one and if you encounter any specific problem - let us know and we’ll help you overcome the issue.
That’s a good idea, I already have an idea to check bullets in Area2D, heck, I already do that in another part of the project! I made it so that when they touch the floor, the roof or the walls, the bullets get queuefree()d IF they are in the “bullets” group.
Thanks great idea!