Need help moving a child actor away from its parent, then back to its start, over time, on a button press

This seems like it should be a simple function: I have a Pawn, a skull, with 2 eyeballs inside it. Each of the eyes is an instance of an actor parented to the base mesh of the skull.

347886-screen1.png

When I press a button the the controller, I want the eyeballs to pop out of the head, ~40 units in Y over half a second and stay there until I press again, in which case they return to their origin point (40 units in Y, reversed). My Blueprint keeps getting overly convoluted and I end up in a rabbit hole full of bugs, where the movement is repeated over and over, or somehow the eyes don’t make it back to their origin all the way, so when I press again, they come out further and further each time.

Right now, on press I check the status of a bool (eyes out) and then move to a DoOnce Multiinput node. Depending on the path, I set a vector variable (txAmt) that either goes forward or backward in the Y and moves on to a timeline that takes the Relative Transform of the eyeball object and moves it according to the txAmt using a Lerp and over to a SetRelativeLocation node.

In addition, when the timeline finishes, I pass it back to toggle the bool and send a reset back to the DoOnce.

I’m sure my lack of experience has me thinking, and working too hard and there’s likely a much simpler solution. Bonus question - I want to have the eyes kinda bounce when they come out, but despite a clear bouncy curve in my timeline, it just animates a basic ease over a half second. Am I using the wrong kind of curve?

It’s much easier to just reverse the timeline to put the eye back in.

You also need to fix the start point of travel before the timeline. You’re currently reading the eye position during the timeline, which will give you weird results.

Thanks, I knew I was overcomplicating things. I also discovered that I could even more simply just use the timeline to change 1 value over time, in this case the Y, (and get my bounce) plugging it into an Add node to a broken vector representing the actor’s location. I think I still need to add a check to prevent overlap, like “if these things are mid motion, ignore the button”, but this is where I ended up: