Hi,
I am having a problem with an enemy. It is a stupid problem, but I dont know why is happening. This enemy has platform behaviour, and he can walk on the floor, and also he can invert his height to walk on the roof. The problem is when he is patrolling and he has wall to his sides, he doesnt mirror.
On the floor it works fine, but when he is up, seems like he is not detecting the walls. Why is this happening?
the pseudocode is:
if(enemy is mirrored)
----- Simulate press left
----- if(enemy has wall to left)
---------- enemy set not mirrored
else
----- Simulate press right
----- if(enemy has wall to right)
---------- enemy set mirrored
This works fine on the floor, but no when the height is negative. I tried to change the mirror just in case construct detect the negative height as mirrored, but that iks not the problem.