mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-20 17:39:46 +00:00
feat: variant-based hitboxes
This commit is contained in:
parent
563001351b
commit
b8b2e4f451
16 changed files with 145 additions and 102 deletions
|
|
@ -459,7 +459,7 @@ void PlayerController::processRightClick(
|
|||
blockid_t chosenBlock = def.rt.id;
|
||||
|
||||
if (def.obstacle) {
|
||||
const auto& hitboxes = def.rt.hitboxes[state.rotation];
|
||||
const auto& hitboxes = def.getHitboxes(state);
|
||||
for (const AABB& blockAABB : hitboxes) {
|
||||
if (level.entities->hasBlockingInside(blockAABB.translated(coord)
|
||||
)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue