Weird Behaviour with an "animation"

I’m making some targets for a shooting range software, I’m at the stage where I’m adding animations to give a more polished look to the project.
I’m using timelines and “Set World Rotation” nodes to make the target’s plates “recoil” more smoothly, (the plates and bases are separate meshes) but I’m having some strange behavior regarding the rotation.

First time I shoot the plate, the “animation” works perfectly, but the subsequent times the sequence doesn’t play at all, and the weirdest of them is that, when I reload (a mechanic exclusively made in a totally different blueprint) the rotations are set as normal, but without the gradual transition it should have)

Anyone has any ideas on why is this happening?


(Target BP)


(Behaviour)



(Reload Function and system in player BP)

Yeah your back to back timelines w/ delay are the issue. Do once isn’t helping either. All can be handled with a single timeline and a few events.

Timelines fire updates once per tick for the duration set in the TL. Say your TL is 1 second duration and your framerate is 60 FPS. That TL is firing the Update pin every 16.667ms.

You have a delay node that’s getting called (essentially reset) every time the Update is fired.

So every frame : TL Update fires → Set Rel Rotation → Delay (0.5)

Only the last update is executing the Delay fully, thus your final TL to reset. Then your also resetting the DoOnce every update of the final TL.

Proper way.

Oh I see… Just a quick question, regarding the variables, the “Ready Rotation” and “Hit Rotation” are normal variables or promoted ones?

Still kinda new to UE so I’m not an expert at the functions.

normal

Ok, tried that but the target’s not moving properly, can you say the values that you used?

The values are dependent of your relative rotations.

In the class view port rotate the panel to its default position. Get the rotation and set the “ready rotation” rot variable to those values. Then rotate the panel to the its been hit rotation. Copy the value and apply it to the “hit rotation” rot variable. Save and test.

Ok, one last question, when I was doing it I put the rotation values in the timeline with the time I wanted to (Float Track), can I keep these values (0.2 time and -90 value) or does it only need the time, no value?

Time/values should be 0.00/0.00 and 1.0/1.0 You can use math to create a “New Time” value to adjust how fast it moves.

The whole point here is to Lerp from A rotation to B rotation and vice versa in a set amount of time. The TL Alpha provides a “how much” for the Lerp node.

1 Like