animate an actor when generated

Hello, I would like to know if there is a way that, when generating an actor, it can be animated with sway, like a falling leaf

cap1

here in the box

here in tje leaf

1 Like

Have a timeline that describes the fall movement in the leaf actor. And play it as soon as the first one finishes. The timeline can output a vector for movement and another vector for rotation. And then repeat. Adjust the curves to mimic the movement you need.

1 Like

Hello, thanks for answering. I made the back and forth of the left creating a new vector but I don’t know how I can link it with the nodes. I used sequence but it didn’t work, I also created a new timeline but it didn’t work either :roll_eyes:

These are float tracks. You want vector tracks instead so you can easier do the entire animation inside the timeline without using Lerp at all.

One for YZ movement and one for rotation.


Probably closer to:

I know it sucks, needs more tweaking - pretty certain you can do it better. Use the padlocks and the eye icons to lock/hide vector component.


If that’s not enough, you can also look into how leaves actually fall and use it as reference:

Or even create a spline:

Leaf-detachment-and-falling-step

1 Like

try but it doesn’t work well, the leaf stays at a far distance

cap1

I also have a series of nodes linked before the timeline

You are not doing it correctly.

• you are animating the entire actor using its Root Component and apply relative coordinate to world (this actor’s relative frame is world)
• you are using a timeline that is inside another actor (box)


Instead:

  • place the Timeline inside the Leaf actor and attach the leaf mesh to the root so we can use relative space only; note:

  • when the box’s timeline Completes, play the Leaf’s timeline. In the box that spawns the leaf:

There should be no need for Delays either unless you need something specific. You could enable overlap events when the Leaf’s TL completes. So the leaf can be interacted with - of that’s what you’re after.


Alternatively, add world coordinate to the timeline track result.

1 Like

Hello, it seems to work but you can’t see the leaf, maybe it doesn’t come out of the box

caida1

Should I leave this?

here what I changed in the box

and here in the leaf

and I took this out

Where is the script that moves the leaf out of the box (orange):

Just like you did with the mushroom.

And this is not connected:

in the box actor

still the same :grin:

You do not have the script that moves the leaf out of the box. You just put a Print String there…

And the values are too small to do anything:

Either multiply the output or put greater values - see my example. You’re moving the leaf by 4 centimetres - it’s probably still in the box.

Is that the problem?

No, the problem are:

  • you have no script that moves the leaf out of the box
  • the values for the leaf animation movement are too small

Do I add more value to that?

First of all:

Where is your script that moves the leaf up, like you moved the mushroom.

Do I add more value to that?

Just multiply the output of the timeline by 50 instead.

Yes, use the same method as the mushroom.

Not according to this you are not:

You had it working:

And you removed it.

I tried destroying the box to see if the leaf is inside and it wasn’t :roll_eyes: :smile:

You had it working here - see if you can restore it. And only then add the leaf animation.

the lerp only allows me to enable one channel

or just the fall or just the swing