How can I make a projectile return after being fired?

I currently have a flying ship. I need to shoot an object and have it travel in a fixed amount from the ship and then come back to the ship as the ship is moving. Something like a fixed grabber arm, like those machines full of plush toys where you control a joystick and press a button to extend the arm and then the arm comes back, except the grabber and arm are always rotated the same as the ship and the ship can move while you are doing this.

I have the basic logic in the screenshot, just not exactly sure what to use for my A and B of the Lerp. I have used this kind of timeline elsewhere and it seems to work and I thought it would be good for this.

I think it’s good !, just make sure that alpha’s value is between 0 and 1

The only thing I see that you may need to set is if your OutEndPoint is an offset from your ship’s position, you need to calculate that position (don’t see it being calculated here). Otherwise if OutEndPoint is just a static point in space, then you’re just going to fire to that point in space every time and not relative to your ship’s position.

Hope that helps!

-Steve

Correct, and thats my issue, just not sure exactly what nodes to use and need to think more about how to dynamically update that outEndpoint as it is never fixed. The total distance it travels from the ship, say 600 units for example is fixed, but, as it goes out and then comes back it’s exact position in 3d space relative to the ship is changing. I think I need another timeline and lerp to set the outEndpoint and then start decreasing it once it has gone 600 units.

Here’s an example of how to calculate out 600 units directly in front of your ship and one possible way to start your setup for the rest:

-Steve