Hi. I'm using pathfinding behavior to move my character. I want my character to be looking on the left (be mirrored) when he is moving to the left and looking on the right when moving right. Seems easy: I just need to know where is his next node he is moving to located and if it's X position is higher than my characer - set not mirrored, if it's lower - set mirrored.
However, there is a problem. When moving to the left - he is looking to the left always. But when he's looking on the right - he first looks to the right but then right when he's near his last node (without an obvious reason) he starts looking left, then right again (all while looking right).
That's headscratching. I've thought that maybe pathfinding thinks that it reached it's final node too soon, so I've tried updating mirrored not every tick, but on reaching next node. There is no "on node reach" pathfinding condition, so I had to make 2 new variables: one will hold the information of current node, the other one will change when the node will be reached.
But that did not help as well... Anyone have any suggestions? I can't seem to find any tutorial where pathfinding is being ised in isometric perspective (instead of top-down where character do rotates with pathfinding). Thanks!