rvandoosselaer / Blocks

A block (voxel) engine for jMonkeyEngine
BSD 3-Clause "New" or "Revised" License
42 stars 14 forks source link

Change center point of block shapes #43

Closed rvandoosselaer closed 4 years ago

rvandoosselaer commented 4 years ago

The center point of a block shape is now at (0.5, 0, 0.5). This was intended so that the y-value of a block is equal to it's height in the world and to easily rotate around the y-axis.

When adding more and more blocks and shapes to Blocks it becomes clear that a lot of blocks require an inverted shape (rotated around z or x axis). Since the center point is at the bottom of a block, this inverted shape cannot be obtained from rotating the mesh of the non-inverted shape.

By changing the center point to (0.5, 0.5, 0.5) one shape can be rotated in 6 directions without the need of additional shapes.

All existing shape's should be adapted and cleaned up.