VInterpTo can't follow objects on splines?


Did anyone tried to follow a mesh that is animated along the Spline using the VInterpTo?

I am having a simple test setup:

  1. an object that tries to follow another object - Pine
  2. an object animated on the spline - Cloud
  3. an object animated with set actor location updates - Bark

The Pine BP is having a very simple setup:

If my Pine is set to follow the Bark it all works like intened, but when I switch it to follow the Cloud, which is animated along a spline, the Pine does not catch up with the Cloud, but it gets interpolated to it’s starting position. The Cloud setup is as follows:

I did also try:

  • promoting the distance along spline into separate variable and read that
  • using the world location node as the input for the variable, which returns different values, but it does not work anyway

It looks like using the spline for animation messes things up a bit, but I wonder if there is something that I could do differently to get it working.

Have you tried following the cloud’s mesh component specifically, rather than the whole actor?

According to the description the GetWorldLocation is targeting the Static Mesh Component, so the answer would be: yes.

Just to make sure I have also just tried to get the mesh location by dragging the component into the graph and getting the world location from this reference and it doesn’t make a difference.

Is there any other way to try to get the mesh world location?

Hi Rimau,

Have a look at Kaos’s answer in this thread Closest position on a Spline to a Player - UE4 AnswerHub. You could possibly use the Get Closest Position function to get the closest point on the spline to the cloud and then VInterpTo your other actor to that position.

Thanks for the link, looks interesting. I will test it out in a day or two.