#Procedural Generation Issues

1 messages · Page 1 of 1 (latest)

lost silo
#

Hello

midnight slate
#

so the issue is what exactly

lost silo
midnight slate
#

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

lost silo
#

Lemme try

#

im really new to coding so im watching a lot of tutorials and ask questions to AI

lost silo
midnight slate
#

you can read whatever data you want from them

#

Basically - the same way you're getting it from the instantiated room

lost silo
#

but thank you tho, its at least generating now

#

by first doing the overlapbox

#

but now it seems to be double stacking rooms

midnight slate
lost silo
lost silo
#

New code

#

its now double placing rooms for some reason

#

like ontop of each other

midnight slate
#

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

lost silo
midnight slate
#

yes but that's very vague

#

how many rooms should be generated

lost silo
#

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

midnight slate
#

there's nothing enforcing that number as far as I can tell

#

oh i see

#

I only just now noticed this is recursive

lost silo
#

there is except if i removed it wait

#

lemme see