I am trying to spawn in rooms (Levels) randomly.
I wanted to check to see if the level is being loaded over another level so I was checking to see if any of these meshes overlap but it doesn’t seem to return any anything.
I will say these are default wall meshes (not sure if they have collision and doesnt seem to le me check)
I enabled the collision for the walls in the Details panel though.
Ultimately Im just trying to check if one level is loading on top of another level, any ideas?
I myself have made something like this and found that the cheapest and most effective way of going about this is to add a volume to each room- like box collisions- shaping out the level. Then you check if THOSE overlap, and if so, you remove the room before it starts to spawn out.
There are some lengthy tutorials on this process but give it a shot! It’s really satisfying once you get it all working.
Disclaimer: This link is not affiliated with Epic Games, Unreal Engine, or their partners.
This is the exact tutorial I watched but in his video he is using um… Actors I think (Not Levels). So he is able to put a collision box in and around the area.
I tried with TriggerBoxes instead of meshes previous but it didn’t seem to work either, but all I did was turn on the collisions in Details for he box. I didnt make he special collision layer the guy in the video does, is that the issue?
The only reason I wanted to do level is cause it was how I was already coding things and it seems the level editor is more natural for where you want to actually design a space rather than in the actor like he was doing. I’m just explaining this because maybe I am wrong about somethings.
If you are spawning in random rooms, you do want them to be actors. Level streaming is another option, however for that the levels are intended to be static in location. You can design your rooms however you’d like- including adding random spawners within the rooms. Actors within actors within actors. Also loading a level is typically going to be slower and more intensive than spawning some actors- This way allows a lot more freedoms.
For instance:
Room 1 has a spawner at a certain location. When the room spawns, it could spawn a table or a desk. The table or desk always spawns a chair but it could be a desk chair, a kitchen chair, or an office chair. Then on top it could spawn a lamp or a picture frame or a TV. And then you could reuse this over and over, quickly.
You do get a lot of similar things you can do with a level vs an actor- levels are just more restricted and are intended to house the actors.
Is there a way to get the full regular view port while in actor area? Is there a way to work on the actor while viewing it within the actual level at the same time?
If you’re modeling you want to use the viewport (standard level area) to make a mesh and then you can use the modeling options to export it as a static mesh for use as an actor component. You don’t usually want the entire thing to be one mesh- you make walls, columns, ceilings, floors etc in pieces and then bring them together in the actor to make your rooms. This is referred to as “modular building”, which is a type of “Kitbashing”. For instance, from what I’m seeing here you could have:
But what it looks like is:
1 static mesh room
4 plants
Doing it the modular way means you can use textures more effectively, and do things like seal up any doorways that don’t have doors by replacing the doorway_wall with an additional flat_wall once the dungeon has completed building itself.