X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fui%2Fui.cpp;h=2d3b4679552045ad557e1b62fa978046619bc36f;hb=54cead1fdf3d1df9187f0cd249322f1e4d85a639;hp=89c34109be2340b9214a6f3e8854cddb49672b06;hpb=ec85ac414e4e60295484ca1752876919ce5a8390;p=blank.git diff --git a/src/ui/ui.cpp b/src/ui/ui.cpp index 89c3410..2d3b467 100644 --- a/src/ui/ui.cpp +++ b/src/ui/ui.cpp @@ -217,7 +217,7 @@ void DirectInput::PlaceBlock() { // when aligned with player's up (first mode, and currently the only one implemented) // project the player's view forward onto his entity's XZ plane and // use the closest cardinal direction it's pointing in - const glm::vec3 view_forward(-GetPlayer().GetEntity().ViewTransform(GetPlayer().GetEntity().ChunkCoords())[3]); + const glm::vec3 view_forward(-GetPlayer().GetEntity().ViewTransform(GetPlayer().GetEntity().ChunkCoords())[2]); // if view is straight up or down, this will be a null vector (NaN after normalization) // in that case maybe the model forward should be used? // the current implementation implicitly falls back to TURN_NONE which is -Z