
0
En revisión
Find the world position for a room left corner
I am working on a code that will spawn in designed rooms to fill the empty rooms. Is there a way to figure out how to calculate the world position of the room cell

0
En revisión
Daedalus hace 10 años
You can have a look here for a list of all of the exposed methods; in your specific case, you could use GetObjectsOfType(SelectionObjectType type)

0
John Leutz II hace 10 años
Ok I understand how to use the GetObjectsType....My prefab is a whole room in itself, I can capture the rooms cell so I know the cell location the room is generated. I am just trying to figure out how to translate that (i believe it is the left corner of the room) to a world postion.

0
Daedalus hace 10 años
Well, as of now, that's the best you can get with GetObjectsOfType, but given that your prefab is a whole room, you could just put an empty GO or something like that in the left corner of the room; how does that sound?

0
John Leutz II hace 10 años
Nods...Question...does your cells function in a grid base, and the size of a tile...If that is true then I could multiply the cell location by the tile size to get the corner I am looking for?

0
Daedalus hace 10 años
Yes, of course it's grid-based, so if you're using modular stuff it should be easy to do what you say.

0
John Leutz II hace 10 años
Thank you for the information.

0
Daedalus hace 10 años
You're welcome! Let us know if you need to know something else.
Servicio de atención al cliente por UserEcho