### Prefab quirky

Friendly conversations, and everything that doesn't fit into the other forums.

#### Prefab quirky

Bloodknight
Posts: 138
Joined: Tue Feb 03, 2015 8:58 pm
*note* I am currently using 3.10 since the devhead editor is not production ready in any way.

So, I'm making prefabs for a modular dungeon, room corner, room wall, wall-less section, doorway etc.

They are all perfectly aligned when in the editor.

I make the prefabs.
Then I add the prefabs to the level, and.... none of them lines up, not with the terrain, not with each other.

Code: Select all

position = "0 0 0";
i get

Code: Select all

position = "0 -0.0762939 -1";
which means I have to hand edit prefab files to make them modular, which is time-consuming even when only 2-4 items in the prefab. bear in mind that *every* single item inside a prefab is incorrect if the prefab origin is chosen badly. This quickly becomes an impossible task if you construct a larger and/or more complex prefab.

there is clearly something not quite right, and I'm not sure where to post this as an issue on GitHub since i'm using an old and out of date engine version.

#### Re: Prefab quirky

Johxz
Posts: 441
Joined: Sat Feb 07, 2015 11:37 pm
Hi Bloodkinght,

Maybe my answer not help in anything, from a few months ago I use less the editor and more the pure script. but yeap I remember something similar when I was updating the pacific level (some december commits) some weird positions like you encountered.

I ran short on time lately but i will try to give a test on the prefab.

#### Re: Prefab quirky

Bloodknight
Posts: 138
Joined: Tue Feb 03, 2015 8:58 pm
when it starts making me really angry; I will take a peek at the exact process of where it writes the prefab. My initial impression is that it selects somehow a pseudo-arbitrary 'origin' and then adds the components to the list by selecting their origin points and mapping their position relative to the prefab origin

#### Re: Prefab quirky

Steve_Yorkshire
Posts: 249
Joined: Tue Feb 03, 2015 10:30 pm

Do prefabs take the largest object and use it as an offset? Or something equally odd. I remember something ages ago in the GG forums about prefabs and inherited object positions. Plus there was a code fix for it. But I would have thought that would have been rolled into stock
https://www.garagegames.com/community/blogs/view/20629

#### Re: Prefab quirky

Bloodknight
Posts: 138
Joined: Tue Feb 03, 2015 8:58 pm
I think by default it just averages the origin position, there was a mod from the old forums that @
Azaezel
rolled in to make the largest object the centre of attention.

I've come to the conclusion that not many people are using modular items for development so haven't come across the issues and quirks I have, I think this lack of users using these methods means that advances in the tools are few and far between.

#### Re: Prefab quirky

Bloodknight
Posts: 138
Joined: Tue Feb 03, 2015 8:58 pm
I grouped my prefabs into a simgroup, then decided to move it

I have no words left...

#### Re: Prefab quirky

Bloodknight
Posts: 138
Joined: Tue Feb 03, 2015 8:58 pm

#### Who is online

Users browsing this forum: No registered users and 1 guest