VinterpTo a Skelmesh between two locations

Hello,

I may struggle with a really basic code, but i want to achieve a smooth motions of the Skeleton Mesh component (Sword) between the static Location A of the Sword BP and a moving target B along the red marked path.

With the Code so far the sword follows the target based on the current and following location, not the fixed location A of the Blueprint. I tried to set the current VINterPTo location as the default sceneRoot but then the Sword Skeleton Mesh component does not move at all.

Thank you in advance for taking the time to help me :slight_smile:

Hey @Brotdose!

So let’s get some variables out of the way.

Tower Skel Mesh- I assume that’s the tower.
Final Target- Not sure what this is. What is this?

Right now what it’s saying is you’re trying to move the tower- and at that, only the skeletal mesh. You want to use the entire actor if you can.

So replace the tower skeletal mesh variable with your sword actor variable, get actor location, and plug that into the current on the Interp.

Then replace it for the set world location, delete that node and do it again dragging off of the sword actor variable. That SHOULD be it.

Oh, also don’t do it on Event Tick because then you’re constantly getting the new current location and resetting the interpolation every tick, therefore not letting it do its thing.

Obviously Right after asking my question here, I had a moment of enlightenment. The Lerp node was the missing part

In this case I only wanted the skeleton Mesh component (Sword) of the BP to move between the static root location of the Actor itself and the moving target along the red marked path. But anyway I luckily found an answer myself, but i still really appreciate your fast try to help me :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.