Timeline node either moves blueprint to world origin or just doesn't work

I want all item pickups in my game to float up and down slightly like in older games. I was able to get this effect on the blueprint for the weapon pickup in Unreal’s first-person template by adding a timeline node that had a basic up/down movement on the z-axis. But for my own pickup blueprints, the exact same blueprint setup moves the pickup blueprint to the world origin for some reason. The up/down movement works, though.

The way my pickup blueprint differs from the template one is that 1) It uses a static mesh of the weapon rather than a skeletal mesh, and 2) My pickup blueprint is a child of a “master” blueprint that handles all player pickups. I tried adding it to that blueprint directly and it didn’t snap to the world origin, but timeline node’s animation would not play. Any ideas as to what’s causing one or both of these issues?

Here’s the blueprint nodes:

The Timeline Node:

The Pickup Blueprint’s location in the world:

The Pickup Blueprint’s location when the game starts:

Try using the Add Local Offset node instead :blush:

Hey @inbredtownsman!

You can also try adapting it like so:

The problem I think is you’re using your Actor’s root which has no parent so the X and Y are returning null, telling it to go to world origin X and Y.

Hope this helps!

Hey, thanks for replying. The track pin on my timeline node is a vector rather than a float(?). I had to split the struct pin to follow your screenshot like so:

This worked, but it forces the pickup to the ground ground and not where I placed it in the world, so I assume it’s using the node’s z-axis movement, but starting from 0. Do you know if I can I get it to play the timeline animation from wherever it’s been placed in the world? When I apply the exact same node setup from my initial post to the pickup blueprint from the template, it does what I want automatically.

Thanks the for the suggestion. I’ll learn a little more about how this node works and give it a shot.

Again, you’d need to add onto it’s already existing z value if you’re gonna keep using the relative location node. But that node I suggested already adjusts the location in local space by considering the actor’s original location to be the origin. That way you don’t need to deal with keeping track of it’s world location and can just replace the relative location node with it in your original post without changing anything else :innocent:

1 Like

You can 100% do what @VisAgilis is saying as well, they’re just multiple paths to the same place.

That being said, it does matter if you’re doing this only to a component or to the ROOT of the actor. Try to make sure it’s a component and not the root! :slight_smile:

1 Like

Timeline

  • Key 0: 0.00, 0.00
  • Key 1: 1.0, 1.0

1 Like