mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
add new block.get_AXIS functions overloads & add rotation support to base:falling_block
This commit is contained in:
parent
9a190acb8b
commit
ab5a62c3aa
9 changed files with 72 additions and 75 deletions
|
|
@ -47,10 +47,7 @@ struct BlockFuncsSet {
|
|||
};
|
||||
|
||||
struct CoordSystem {
|
||||
glm::ivec3 axisX;
|
||||
glm::ivec3 axisY;
|
||||
glm::ivec3 axisZ;
|
||||
|
||||
std::array<glm::ivec3, 3> axes;
|
||||
/// @brief Grid 3d position fix offset (for negative vectors)
|
||||
glm::ivec3 fix;
|
||||
|
||||
|
|
@ -261,5 +258,5 @@ public:
|
|||
};
|
||||
|
||||
inline glm::ivec3 get_ground_direction(const Block& def, int rotation) {
|
||||
return -def.rotations.variants[rotation].axisY;
|
||||
return -def.rotations.variants[rotation].axes[1];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue