Item Centering On Grid


#1

Hey fellow moders or @sdee @Tom or @Albert

I’m having a very difficult time trying to figure out how to center place-able items on the grid. I finally figured out how to work the collision boxes but they are hard to get centered right if the model is off centered. Anyone have any tips?


#2

I believe @Froggy was just encountering this also.


#3

Yeah I’m guessing it has to do with messing with the mob and region sections of the ghost.json but I just cant wrap my mind around how it works.


#4

Yea I encountered this many times too.

It works fine with not scaled items

When I scaled to 1 (10 times bigger) it was off by a half block. So I just made the qubicle object twice as big and scaled to 0,5 (5 times bigger) and changed the centre in cubicle by 1 voxel.

I think region origin has something to do with it.

"model_origin" : { "x": -0.05, "y": 0, "z": 0 },
         "region_origin" : { "x": 0.5, "y": 0, "z": 0.5 }

#5

It kinda depends. Most of the models I’m trying to center are not scaled and are still off centered. When in the collision box mode the origin doesn’t seem to be in the center of the objects.

Ah so you basically exported it off centered?

Yeah I think that has something to do with it as well but I can’t seem to figure out how exactly changing those numbers effect things. I tried setting them all to 0 and I can’t quite figure out how they moved.

I might have to do some more testing. . . We really need some test worlds, it’s so tedious trying to do all this testing in game. :angry: lol


#6

Is setting the world generation size to tiny not working for you?


#7

iirc, I don’t think that has worked for the last several releases… I think @not_owen_wilson was brought into the discussion the last time it came up?

then again, I could be completely off base here… :smile:


#8

It still works.

Edited due to crossed wires. The following will work: (It’s warm here)

{
"user_id" : "blah",
"mods" : {
	"stonehearth" : {
		"world_generation" : {
			"method" : "tiny"
		}
	}
},
"renderer" : {
 **leave alone**
},
"collect_analytics" : false,
"alpha_welcome" : {
	"hide" : true
}
}

#9

Yeah it still works. Just having a nice way to have some more starter resources and the ability to spawn monsters would be useful. haha