• Mods are now organized as resources. Use the Mods link above to browse for or submit a mod, tool, or prefab.

    The TFP Official Modding Forum Policy establishes the rules and guidelines for mod creators and mod users.

Get Bounding Box Size of a prefab

mrsquish

Refugee
Early Backer
Hey All,

I'm working on an app to do my own random gen implementation. Currently I'm playing with noise generation and adjusting the prefab location (bringing them up to the correct ground level). But obviously, the generated ground isn't flat, and it needs to be where ever a prefab is located. Not a particularly difficult thing to code, but I don't know two things.

1 - Where can I find the dimensions of a prefab (x, y, z) - particularly x and z at the moment.

2 - How does the rotation in the prefab.xml relate to N, S, E, W?

Cheers all.

 
I don't know where to find the dimensions.

The rotation gives the direction the front of the prefab is facing:

0 is South

1 is East

2 is North

3 is West

 
Thanks mate, I should be able to find the answer to the size by reading the code, when I get a chance.

 
Back
Top