How move an Actor againts the player using a Timeline?

Hi there!
The player is a hammer, and it smashes the nail in front of him. The nail comes back at its position after 2 secondes.
EXCEPT if the player steps on it, the nail doesn’t come back.
Can you solve this mystery? It would be very much appreciated!

Here is my blueprint of my nail :

And here is a video of the problem : Nail won't come back...like my father - YouTube

Thanks for any tips!

What I want is the nail coming back to its position EVENTHOUGH the hammer is on it.
But here, the nail just stop moving if I step on it.

Could you explain more what should I do? I don’t understand the root… What is a scene component as root?
Thanks for your thought!

im not sure on your particular issue but i personally wouldnt be using relative location the way you currently are since you are moving the root component. you could leave your script as is using relative and add in a scene component as the root. i know you can end up with odd behavior when trying to move the root via relative.

well i may have found at least part of your issue here, your setting your is nailed variable to false as soon as you begin your timeline. this could in theory affect how your location is set, or rather it could set your location several times which would in turn mess up your calculation. to fix that part of the issue move your set isNailed to the finished pin of the timeline, that way you can only hit it again once the timeline is done.

as for the root bit, the root of an actor is the component that all the others are based on in a way. it is the piece that all other pieces are connected to, or put another way its the base level of the heirarchy. the root is also therefore the origin of the actor so all relative locations are based off of its location. a scene component is basically a dummy component, it doesnt get rendered but it still has information like location scale etc. by using a scene as the root you basically have a set point of reference for the origin that you can base the movement of other components on. how this applies for your example is that you could use a lerp vector instead of a ease and you can move between two set locations instead of having to get a location and set a variable. this would allow you to place the actor and move the nail say 80uu in the -z quite easily.

have you tried turning off collision or ignoring them under collision presets change the default

So:

1- The part about the Is nailed didn’t seem to change anything. But I will keep the way you said!

2- For the root, now I understand, thank you very much for that!
One thing I don’t understand is how I can apply this to my problem.
I see why I should use the lerp, but what is the “new variable”?
And how should I use the root for my nail to move to a certain point?
Do I make a scene component in the viewport and position it where I would like the nail to go. Then Get the location of that scene component and tell the nail to go there in the lerp?

Thanks for your time, it is really appreciated!

I tried to change my collision preset, and even with Ignore all, if I step on it, it won’t come back.

BUT, I tested something : If I pull it in the air, and jump on it without even hit it, it goes does, through the floor and it stops there because I can’t touch it anymore. So I disabled the gravity, but it continues to drop down.

I believe my character have some weight or something repelling my nail…

So little update for what it is worth : The problem ONLY occurs when the nail is doing movements (upward, downward). If I step on it while it is stand still, no problem. So I guess the problem is in the timeline.
Here are some images

Sorry for the spam, but I think I got it!
I played in the collision preset, choose Custom, check Ignore all except WorldDynamic and it works!
Here are my settings for now on.

265713-collision.png

Thanks to Dabs863 for the tip! :slight_smile:

hey glad it worked :slight_smile: it helped me so i figured i would put it out there