I'm trying to use LineOfSight behavior with PathMovement.
I have three objects: hero (black circle), enemy (red circle) and wall (black square). Wall and enemy are solid. Hero have 8-directional behavior, enemy have LineOfSight behavior with PathMovement and wall doesn't have one.
Enemy is set to move around with his path. When he see hero, he must stop following the path and follow the player. When he lost hero from sight, he must get back to his route and follow it again.
It's kinda hard and I don't really know how to do this. Maybe somebody can help me.
I made something like this, but it doesn't really work as it should (the enemy is teleporting over the screen and starting his path from start):