mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
AABB blocks rotation support (WIP part 1)
This commit is contained in:
parent
8bc8eb14bd
commit
0c764bcbd9
8 changed files with 120 additions and 90 deletions
|
|
@ -193,7 +193,12 @@ void WorldRenderer::draw(const GfxContext& pctx, Camera* camera){
|
|||
const vec3 pos = PlayerController::selectedBlockPosition;
|
||||
const vec3 point = PlayerController::selectedPointPosition;
|
||||
const vec3 norm = PlayerController::selectedBlockNormal;
|
||||
const AABB& hitbox = block->hitbox;
|
||||
AABB hitbox = block->hitbox;
|
||||
if (block->rotatable) {
|
||||
auto states = PlayerController::selectedBlockStates;
|
||||
block->rotations.variants[states].transform(hitbox);
|
||||
}
|
||||
|
||||
const vec3 center = pos + hitbox.center();
|
||||
const vec3 size = hitbox.size();
|
||||
linesShader->use();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue