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?
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.
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
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!