Make enemy follow player but only along one axis
I'm trying to make an enemy always follow my player in a sidescroller but I only want them to follow my character on one axis. When player character jumps the the enemy starts following them on the Z axis as well.
I've been trying to only pin one single axis and it does adjust the movement of the enemy but it starts moving it in a completely different direction.
This is the non restricted working blueprint.
And this is what I am attempting to do but it messes up enemy's movement direction
asked Jan 20 '19 at 02:04 AM in Blueprint Scripting
What you have in your second image seems to ONLY be using Z, it seems you want to plug in x and y and ignore Z.
answered Jan 20 '19 at 03:28 AM
I think you may make a new location vector and feed that vector with only the player's axis you want the enemy to follow along .. and add movement input to the enemy towards that location vector. I am sorry I am just an absolute beginner, so please pardon me if I am wrong .. I just wanted to help. Good luck :)
answered Jan 22 '19 at 06:21 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here