I’m new to Blueprints, what I’m looking for is a way to spawn a mesh on a specific place after the player overlap with a trigger. I tried doing it as it seemed very easy but it just didn’t work. Surely I’m missing a silly step.
Pretty straight forward. OnOverlap with the trigger, and have your character be the overlapping actor. Then simply AddStaticMeshComponent, or SpawnActorFromClass if you want it to be a specific actor the mesh is inside, and create the transform where you’d like it to be placed. The first option will attach it to the trigger Blueprint, the second would be independent.
Hello pedro9! Could you provide some images showing what you tried? There are many ways to do this and it will vary depending on what you are trying to achieve. As Pariah013 mentioned, you can use the OnComponentBeginOverlap to do this.
The coding will be done in the whichever blueprint you place your trigger box in. Reference the Trigger box and cast to your character. Then use the SpawnActorFroClass node to spawn whatever it is that you want to spawn. If it is a specific mesh blueprint or actor you want to spawn then you can call it in the class there. If it is just a simple mesh that already exist in the library, then you can set it like this.
I’ve tried the one above and it didn’t work I must have missed something! but I’ve tried the same method I used yesterday and it did work, somehow. It’s really simple yet confusing.
Here is your method
So the code you have there is not ‘spawning’ a mesh as you described in the original question, it is setting a new location for the existing mesh in the same blueprint. The way you have it set up there it should fire every time something enters your trigger box (can be anything, characters, any actors, meshes, etc).
The first code should only fire when your character enters it. if DoorsBig is another actor, then it should spawn at the transform. What values do you have you set for the transform?