I’ve been trying to set up enemy character automatic movement with the same logic used in this “Intelligent lift” tutorial: Paper2D: Creating an Intelligent Lift | 09 | v4.4 Tutorial Series | Unreal Engine - YouTube
While lift works perfectly in my prototype, I’ve run into some unexpected issues with enemy character’s location.
As shown on the editor screenshot, the enemy should walk from Start Point to End Point (both are vector variables in Enemy blueprint with coordinates that, supposedly, are relative to the character). Instead, my character is teleported into another location and moves along these coordinates relative to the world (as shown in the gameplay screenshot).
More interesting is the fact that enemy movement blueprint is absolutely the same as lift movement blueprint. And lift is working, while enemy patrol doesn’t. The only difference is that lift is based on Actor blueprint and Enemy is based on PaperCharacter blueprint.
The question is: what am I missing, why this patrol logic doesn’t work as it should?
P.S.: I am using UE 4.10.1. The game is made from scratch without using 2D sidescroller blueprint.
P.P.S.: I understand, that I could store initial enemy location in a variable, then break vectors, then create new ones with Y and Z same as initial and X same as StartPoint X and EndPoint X and move between these two vectors. But this method doesn’t seem very elegant, especially in comparison with working lift