# Moving Mesh exponentially based on character position

Hi all,

I am having a small issue trying to work out how to move a mesh based on the character position with exponential speed.

What I am attempting to do is, have the player move towards a target that ‘moves away from the player at an ever increasing speed’ so the player can never reach the target until he has traveled a set distance of 2000 units for example, then the target mesh should stop and allow the player to reach its new location. The target mesh should also stop if the player stops moving towards or away from it. However, I need this also to work in reverse if the player moves away from the target 'the target gets closer and slows its speed down. I only need this to work on a single axis (Y-Axis for example) but am having major problems trying to not only make this happen but also work out the math needed. initially I thought about using the camera distance but the is no good as you can walk backwards towards the target.

Now, I have been able to get the object in question to move away from the character at a fixed speed but thats as far as I have been able to get.

Any help, examples or tutorials would be greatly received. Here is what I have so far.

Update

I have managed to make a little more sense of this. It now detects if a player is present. Finds the distance between the player and target mesh, and sets a movement speed of the mesh away from the player if it is within a set distance away(see below BP image). I still need help getting the mesh to move away from the player faster and faster and faster. And also how to implement this in reverse for when the player backs away from the mesh.