diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-02-06 17:36:03 +0100 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-02-06 17:46:17 +0100 |
commit | b118fc208028cd1deed8b735d18096e090d546b6 (patch) | |
tree | 46c2619ed22e58a78928f570176422392ef1ff49 /src/GameState.cpp | |
parent | Simplified raycast (diff) | |
download | AltCraft-b118fc208028cd1deed8b735d18096e090d546b6.tar AltCraft-b118fc208028cd1deed8b735d18096e090d546b6.tar.gz AltCraft-b118fc208028cd1deed8b735d18096e090d546b6.tar.bz2 AltCraft-b118fc208028cd1deed8b735d18096e090d546b6.tar.lz AltCraft-b118fc208028cd1deed8b735d18096e090d546b6.tar.xz AltCraft-b118fc208028cd1deed8b735d18096e090d546b6.tar.zst AltCraft-b118fc208028cd1deed8b735d18096e090d546b6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/GameState.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/GameState.cpp b/src/GameState.cpp index 180db98..28e8007 100644 --- a/src/GameState.cpp +++ b/src/GameState.cpp @@ -39,6 +39,7 @@ void GameState::Update(float deltaTime) { RaycastResult raycast = world.Raycast(player->pos + player->EyeOffset, direction); selectedBlock = raycast.isHit ? raycast.hitBlock : Vector(0,0,0); distanceToSelectedBlock = raycast.isHit ? (player->pos - raycast.hitPos).GetLength() : 0.0f; + raycastHit = raycast.hitPos; } } |