Prefab quirky

Friendly conversations, and everything that doesn't fit into the other forums.
7 posts Page 1 of 1
Bloodknight
Posts: 138
Joined: Tue Feb 03, 2015 8:58 pm
by Bloodknight » Sun Feb 18, 2018 2:19 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.

instead of seeing positions like

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.
Johxz
Posts: 441
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Sun Feb 18, 2018 6:08 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.
Bloodknight
Posts: 138
Joined: Tue Feb 03, 2015 8:58 pm
by Bloodknight » Sun Feb 18, 2018 8:31 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
Steve_Yorkshire
Posts: 252
Joined: Tue Feb 03, 2015 10:30 pm
 
by Steve_Yorkshire » Mon Feb 19, 2018 1:05 am
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
Bloodknight
Posts: 138
Joined: Tue Feb 03, 2015 8:58 pm
by Bloodknight » Mon Feb 19, 2018 11:43 am
I think by default it just averages the origin position, there was a mod from the old forums that @
User avatar
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.
Bloodknight
Posts: 138
Joined: Tue Feb 03, 2015 8:58 pm
by Bloodknight » Mon Feb 19, 2018 11:44 am
I grouped my prefabs into a simgroup, then decided to move it
Image

I have no words left...
Bloodknight
Posts: 138
Joined: Tue Feb 03, 2015 8:58 pm
by Bloodknight » Mon Feb 19, 2018 11:50 am
After saving and reloading the mission
Image
7 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests