Help with Transforms?

I’ve been trying to get a character to move to a new location a certain distance behind another character and stay behind that character as it moves around.
I’m looking for a way to do it in code and not blueprints (unless there is no other way). I think my problem is more with understanding how a transform works in UE4.
I’ve looked through various posts and the API (wish it had some example code like the MSDN) and have come up still confused.

If I know both character locations what steps would I need to take to figure out the location I should be moving the character to be behind the other one?
I’m looking mostly for guidance and a push in the right direction mostly. Thanks for your time guys.

Way not figuer out the distance you want the player to be from the other player.
Then calculate the the “offset” so when the location of the first player updates its tells the second player to update its location.
With the calculated offsett for from the first character.

Or attach a character to a Arm Spring component like a 3rd person camera. (dont know if that will realy work.) :slight_smile:

.

I’ll give those ideas a try, thanks.

Adding a spring arm to the target and then attaching to the socket actually worked. Great idea.

Glad i could help out. :slight_smile: