SpawnProp and .SetMesh not working, pls help.

Hey, I found this code in documentation and tried it myself but not only SpawnProp runs, SetMesh Prints too. Yet, nothing is in the specified location… Is this a bug or am I doing something wrong? I’m new to learning verse.

I tried to deleting the SetMesh lines and just decided to check if prop spawns at least (an default prop will spawn I believe?). But even the default prop didn’t spawn.

I’m pretty sure I replicated the steps in documentation properly and assigned the mesh I imported to .SetMesh just fine. I have no clue what’s going on but when I tried SpawnParticleSystem, that didn’t work too.

Hello @LyssaSugarNya how are you?

In order to understand what is wrong there, could you share the code you are using?

It would be usefull if you share the link to the documentation you found, so I can be sure we are using the same material as reference!

I’ll be waiting for the details to help you!

1 Like

Hello @BRGJuanCruzMK, I’m doing great.
Here is the link for the documentation code I tried replicating: Exposing Assets with Asset Reflection to Verse in Unreal Editor for Fortnite | Fortnite Documentation | Epic Developer Community

In there, I found out how to expose your mesh to your verse code and spawn them. Which included using SpawnProp and .SetMesh that doesn’t seem to work. Same problem for (SpawnParticleSystem).

Here is a screen shot of my code:

I tried deleting the SetMesh code and just checked if “SpawnProp” would just spawn an default prop, but even the default prop wasn’t spawning. I asked the AI developer assistant, and it couldn’t find the problem with the code itself.

Thank you for your time!

Hello again @LyssaSugarNya !

I’ve been tinkering with this feature and there are several things that could be causing your issue.

As you already said, there seems your code is ok. The problem is not there. You can know that with your “Spawned Prop” text being triggered.

The problem here, probably, is that your mesh is spawning in a place different of your desired spawn coordinates or underground.

You are using “Z := -400”, which leads the prop to spawn underground. Try using positive numbers there and check if you can find your mesh.

Another thing that could be making your mesh spawn anywhere else is to have its 0,0,0 in a weird place. As you can see in the following example, I’m trying to spawn my mesh on my Island’s 0,0,0 but it spawns with a little offset:

As you can see, my mesh doesn’t spawn at my Island’s 0,0,0 but higher in Z and with weird offset in X and Y.

The last thing that could be happning is related to your mesh’s 0,0,0 as well, and it is the rotation. If the 0,0,0 is set wrong in your mesh, the rotator will rotate it weirdly!

So, in summary, check if your mesh’s 0,0,0 point is set properly and test spawning it in your Island’s 0,0,0 (you can add a positive offset in Z to avoid sawning it underground) to see if it spawns!

Hope this helps you! Let me know if you need more help!

1 Like

Wow, you were right. I was using the coordinates wrong. Whenever I move things in the editor up and down, I always use U (second coordinate)… Which lead me to believe that in verse too it would be Y cus it’s the second coordinate value. Now I understand that Z = U coordinate. Thank you.

This is why I couldn’t see my prop, cus it was spawning below the platform. You’re right.

1 Like