Closed HydrolienF closed 1 year ago
Creature should also choose there direction to walk at max speed (not reduce one because run close to a wall)
a way to fix it is to be able to run away from multiple enemis & to add wall as an enemi
To include wall as enemis without having to deal with %360, we can add an offset & test as if it was 0,0 corner (angle from 90 to 270)
It is working well for the current usage we have. (& should work well for multiple enemies levels).
Taking distance & speed of enemies into acound may be add in futur, but there is no need for now.
It may be a good idea to use https://github.com/libgdx/gdx-ai for behavior tree so that Creature take a good choice. Good choice become a bit complex when AI have to avoid more than 1 enemi or an enemi and a wall.