mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-20 09:29:44 +00:00
feat: variant-based hitboxes
This commit is contained in:
parent
563001351b
commit
b8b2e4f451
16 changed files with 145 additions and 102 deletions
|
|
@ -213,7 +213,7 @@ model::Model ModelsGenerator::generate(
|
|||
mesh.shading = !blockDef.shadeless;
|
||||
switch (blockModel.type) {
|
||||
case BlockModelType::AABB: {
|
||||
glm::vec3 size = blockDef.hitboxes.at(0).size();
|
||||
glm::vec3 size = variant.hitboxes.at(0).size();
|
||||
float m = glm::max(size.x, glm::max(size.y, size.z));
|
||||
m = glm::min(1.0f, m);
|
||||
mesh.scale(size / m);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue