Moving an actor towards player

This will not work, it is invalid.
FRotator NewRotation{ NewLocation.Rotation() };

Also.
You are using the rotation function that is suppose to substitute a tranformation matrix but it’s not formulated properly. Find another way to use it.

I cannot write code for you, I can only help you with the code you got :slight_smile:
Find another sintax mode for it.

This should move the ship AWAY from the player, no?

I thought you wanted the ship to follow you, not head away ?
The steps.
1 Get the actor location and the player location
2 Get some sense between them by calculating the distance, this will give you a vector with a path towards the character.
3 Now you have to transform “something”, because to head into that direction you got to “turn” so your path needs to be transformed to turn around ? your ship towards ?
4 Apply what ever you like by setting it with a forward vector or direction used with delta time to finally move the object once all is done

You could skip feeding the distance to a vector and feed it elsewhere.
Most important distance between Store to the Frotator this - this Rotate.
So Frotator var ObjectA - ObjectB Rotation()

Look you got it here
FVector MovementVector = PlayerCurrentLocation - CurrentLocation;
But you set it as a vector because you wanted then to feed the vector to that but it does not work that way because you are missing elements.

So why complicate things.
FRotator somestuff = some distance stuff between objects .Rotation();

You could do this in blue prints, but you chose C++ so you need to understand what you are doing, not just copy paste code. The idea is to store in your Rotator the distances between the objects, you chose another way to feed it to a vector there for you now have to tranform the vector to rotation, or maybe not so just use the function with the rotator.