unreal-engine4unreal-blueprintspawning

Spawning blueprint does not spawn anything (UE4)


Here's a problem: my goal is to have a ball game with obstacles. I made two obstacles (cubes with triggers) and the spawner code does not spawn them - nothing at all. It does compile without errors, but just does not work. These blueprints are part of the track class (the track the ball is on). Here is the code: (obst amount = 7 - the code before it works fine - its linked to event tick)

code

Here are the obstacles: (no code in them)

enter image description here

enter image description here

Here is the track:

enter image description here

I'm using Unreal Engine 4.26.2


Solution

  • If it is showing up in the outliner, but you don't see it here's what I would try.

    First, unplug your X and Y location. Manually input something you know is right in front of the player.

    If you can see it after that, start printing the the coordinates of the spawn location. If those look right and you can't see it still, try spawning a regular cube instead. If you could see the cube but not your obstacle, then I'd check the obstacle BP. In that case it's likely either the scale of the mesh component or it's set to be hidden in game.

    Sorry I know this isn't a definitive answer, but I don't have enough reputation to comment instead.