Basically I want my ai to walk to the right, hit a colision with a stop object and walk left, rinse and repeat.
BUT before turning, I want it to wait fox X seconds without moving.
patrool state: walk in the direction that you are facing (check if mirrored) , if hit object -->wait state
wait state: wait for 1-2 seconds without moving, turn around , then go back to patrool state
It however does one of the two:
the object does not go to wait state
the object goes right through the colision and doesnt even go to wait state.
can someone please share a working example. Nobody on youtube has made one where the enemy stops, then waks in the opposite direction