Download

Actors spawning in wrong location

I’m having a very strange problem with a blueprint I created.

The blueprint is basically a crate from Crash Bandicoot with some minor differences. The collectable items that come out of it are not directly added to your inventory, but rather launch out, similar to a treasure chest in Spyro.

A few weeks ago, the crates stopped spawning the collectables when the player destroyed them. It took me a while to figure out why, but eventually I figured out that for some reason the blueprint was now spawning them somewhere else in the level. I don’t recall exactly what code was different at that time, but I think I took off a node that was setting their relative or local position, which fixed it.

This seemingly occurred for no reason, I did not edit the blueprint and looking through my perforce logs showed that no one else had either.

The problem is now happening again. The collectables are set to spawn 15 units above the center of the crate on the Z axis. When this was enabled, they would spawn several thousand units away on the X and Y axis. Setting all spawn transform values to 0 would cause the collectables to spawn slightly below the playing field, but in the correct X and Y position. Setting Z to 1 would fix the issue.

Is this a bug in unreal? Or am I just going insane?

Or you could post a screenshot of the relevant snippet of script. Perhaps someone can poke a hole in it. Consider it.

The collectables are set to spawn 15 units above the center of the crate on the Z axis. When this was enabled, they would spawn several thousand units away on the X and Y axis. Setting all spawn transform values to 0 would cause the collectables to spawn slightly below the playing field, but in the correct X and Y position. Setting Z to 1 would fix the issue.

This already sounds strange as is. I don’t understand why you’d want to set any transforms. If I had a spawner, I’d:

Now, that 15 is not enough Z to spawn anything above - things would overlap badly unless collision channels were set to ignore. And handling collision overrides is another thing not explained in the example.