Spawning coins on top of obstacles [UE5-0]

So i’m creating an endless runner in ue5, and i want some of my coins to spawn on top of the obstacles that i created, pls how do i do that. I only got experience in web development and still new to unreal engine. This is the event graph for the coins

and this is the function for spawning coins on my floor tiles like the floor the character runs on, the class for coins is the extreme bottom.PS: the blueprints for spawning are for the first lane

There’s no functionality for my obstacle, it just being spawned by the main tiles

You can get the world Z location of the plane and add the amount of offset you would like

1 Like

Can you simplify a bit further

Get the mesh reference (like the one you showed in the picture) but search for “get world location”. Once you have the world location of the mesh right click the vector pin to get the X, Y, and Z as floats. Drag off of the Z float and add 100, get the coin blueprint and set the world z location to the new float.

Ive gotten the mesh reference, in this case D, i got the world location, but how do i add 100 to the z pin, when it shows return value Z, do i use the add node? ive gotten the coin blueprint.

what do i hook up to return value z

Hello, you can right click on the orange pin and choose “split struct pin”. It will split the transform pin into location, rotation and scale. Repeat the operation on the location pin and you will have your three floats exposed.
Then you just have to use a “add (float)” node to add 100 to your return Z value

1 Like