If we have an object that is 2 world units wide and long, then the true centre of the object is where 4 blocks join and not at the centre of one.
![qubicle voxel editor torrent qubicle voxel editor torrent](http://www.kicktraq.com/projects/1590639245/stonehearth/minichart.png)
So you actually want to use the opposite adjustment in the Z-Axis compared to the model position in Qubicle.įor a model where either one or both of the sides are even, you have to decide which of the off center points the model will rotate around. In Stonehearth, the positive Z-Axis points to the front of an object (or the "south"). In Qubicle, the positive Z-Axis points towards the back of an object (or the "north"). The exact difference is the direction of the Z-Axis. X set to -0.05 because that is the difference between the origin point (0,0,0) and the actual centre of the object (0.05, 0, 0.05) in Qubicle.īut why is Z +0.05 when X is -0.05? As discussed before, the coordinate system of Qubicle is different to the coordinate system of Stonehearth. With this example, the central voxel is placed in the positive direction of both X and Z. Whether you use -0.05 for X or Z depends on how you orient the object itself around the origin in Qubicle. Try it out in the Entity editor and click on "Update" to apply the changes, then try rotating the object again and observe if the model gets displaced. If the model needs to be positioned by larger amounts, then you can and should do that in your voxel editor.įor instance, if you create an object in Qubicle that is 3x3 blocks in the X and Z directions, you'll need to set model_origin to something like -0.05 for X and 0.05 for Z. The value should always be 0 or + or - 0.05 (given that the default scale for objects is 0.1). When this happens, you set that dimension to 0.05 so that it corrects the alignment in the world. Setting their model origin is easy because there is a single voxel that is the center of the model. Some models have X and Z dimensions that are not exactly divisible by 2. If our model doesn't rotate correctly, we need to determine where should its model_origin be. The axes should match exactly the same part of the model no matter which direction it's facing. Now we can click on the "Rotate Entity" button (a circular green arrow) and see if our model rotates correctly (the first time you click this button it will reset the model to a default rotation, then the next times it will cycle through the rest of directions in order). Make sure the object is not axis aligned by unchecking the check boxes for X and Z under "Axis Alignment Flags" and clicking the "Update" button. In the game, place the item in the ground and open the Entity Editor. We can use debugtools to help us determine the model origin. Normally all objects (except hangable ones, weapons, and most of the objects meant to be animated) are centered over 0 for their width and length and aligned with the ground in your voxel editor. It works based on the origin of the model itself (which is defined in Qubicle/your voxel editor). The model_origin is an offset (defined in terms of the world axis coordinate system) so that the model aligns well with the world. Here's a barrel icon and you can see that the origin comes from the middle of the bottom. They represent where the origin (0,0,0) is in the voxel editor for that model, the point around which the object will rotate in the game, and the location where the game thinks that the entity is. If you have debug keys enabled, you can press F11 to see the axes of a given object.
![qubicle voxel editor torrent qubicle voxel editor torrent](https://i.pinimg.com/736x/5c/b9/9d/5cb99dc34c0f98b4a95c6c3fc5d40c3e--voxel-editor.jpg)
Other items like weapons and armor have special rules for their origins and so aren't discussed here. Some decorations are attached to walls, so their origin is the centre of the block that attaches to the wall. For furniture, they are normally attached to the ground, so the origin is at the centre of the bottom.
![qubicle voxel editor torrent qubicle voxel editor torrent](https://steamcdn-a.akamaihd.net/steam/apps/454550/ss_f4b2b74924722536322dfb45519f2d29b9ad6f2f.1920x1080.jpg)
In general, models have an origin at the centre of the surface to which they are attached. You can define the center (origin) of your objects and how they will rotate by using the mob component.