hello guys i’m working on a 2.5d game with moviment based on games like dungeons and dragons shadow over mystara or alien vs predator games but being a 3d where the character when moving aroud the scene he only can face left and right even when moving up and down.
well this part i made work, it have a fixed camera where it is moving all the directions but aways facing only left or right.
the issue is something related direct to unreal itself than the moving code i did, i say that because the issue can happens even on a "clean code on unreal.
here the issue, when you have more than one direction pressed at same time it will aways use based on what you are doing, or right or down, based on what are you doing, if you are doing a just 2d moviment where the character move only to left or right it will make the right default direction which means if you are moving the character to right and keep holding right and press left he don’t turn to left he keep moving to right until you release right buttom when he finally turn to left(if you are holding left), the same don’t happens if you go the other way; if you are pressing left and press right while holding left the character actually turns to right and move to right aslong you keep holding right, he will ignore the left holding, if you enable to move up and down the same will happens but with down being the “default” like if you are moving up and press down it will move down, however if you moving down and press up, it don’t go up and keep moving down, it ignore the up command aslong you are pressing down.
it was supposed to anytime you press a new direction he was supposed to "move in that direction and if needed rotate/look at it, like if i’m moving to left and press right when holding left he is supposed to turn right and move right and if i’m holding right and press left he switch to left the same for up and down, what make it worst is which based on what i did to keep him aways looking to right and left it get worst.
in my case if the character is facing left and i just press up without other buttom like left, it “turn to right and move up” it only keep looking to left if i’m holding left while pressing up, then he move up facing left, otherwise he aways tro to look to right if in neutral state going up and down.
here my code:
those 2 first are to make it move up and down while looking at left or right
those 2 are for a “double click run” to make it run when doubling click
which due to the original bug are also having some isses, like while moving to “right” i can trigger a double run to right by pressing left 2 times, because he will keep facing right and don’t turn to left to run.
any help to solve it is welcome, again to be clear the code issue looks like come from how unreal handle the moviment because the issue can be easy replicate even with the default settings, just create a new third person template and move a character to a direction the while holding that buttom try to move it a direct opposite direction and you see.