0

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

  • Are you sure it didn't spawn? Did you check the Scene Outliner if there's your obstacle? If it spawns but you cannot see it, you should check if the location you are spawing the obstacle is correct (you can do it by moving the the actor location from Scene Outliner). If it didn't spawn, add a breakpoint in a middle node and see if it process correctly the whole logic. – Simone Lungarella Jul 16 '21 at 08:18
  • It does appear to be here, but there is no outline or even a dot – MegapolisPlayer Jul 16 '21 at 09:23
  • Did you try to spawn a sphere in the same location of the actor you want to spawn? Use DrawDebugSphere and set the center of the sphere with the location, make it big enough and search it in the map – Simone Lungarella Jul 16 '21 at 10:16

1 Answers1

1

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.