#Procedural Generation Issues
1 messages · Page 1 of 1 (latest)
so the issue is what exactly
This approach is not great
you're spawning the room, then doing an OverlapBox
My guess is that the OverlapBox is just hitting the spawned room itself
You should do the OverlapBox before spawning anything
you can just get the size of the box collider from the prefab and use the data from that collider to do your OverlapBox
Lemme try
im really new to coding so im watching a lot of tutorials and ask questions to AI
wait how do i get the box collider from the prefab? The prefab is made in unity with all seperate assets and props
Prefabs are GameObjects like any other
you can read whatever data you want from them
Basically - the same way you're getting it from the instantiated room
i really dont know what you mean by this im sorry im stupid
but thank you tho, its at least generating now
by first doing the overlapbox
but now it seems to be double stacking rooms
if you used AI it's probably because you don't actually know what your own code is doing
only using ai to ask questions and learn not get it fully done by it
New code
its now double placing rooms for some reason
like ontop of each other
You're spawning tons of stuff before you ever check for a collision
The very first thing you're doing is spawning a room. Followed by spawning every single room in the roomPrefabs list for every connector in the room you spawned
Also I'm not sure I follow what the intent is for this code
what's the goal
Get procedural room generation using room prefabs
Its set to max 10 rooms right now
but for the game im trynna make it would grow per level passed
so beginning it would be small