From: Daniel Karbach Date: Fri, 30 Oct 2015 08:46:48 +0000 (+0100) Subject: use model -Z for heading when not moving X-Git-Url: http://git.localhorst.tv/?a=commitdiff_plain;ds=inline;h=31aab11e29aaa58317cbe3147808a3dfe476830d;p=blank.git use model -Z for heading when not moving --- diff --git a/src/world/world.cpp b/src/world/world.cpp index 08ee294..bf2abf3 100644 --- a/src/world/world.cpp +++ b/src/world/world.cpp @@ -161,8 +161,8 @@ void Entity::UpdateHeading() noexcept { heading = Velocity() / speed; } else { speed = 0.0f; - // use -Z (forward axis) of local view transform - heading = -glm::vec3(view_transform[2]); + // use -Z (forward axis) of model transform (our "chest") + heading = -glm::vec3(model_transform[2]); } }