X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcontroller.cpp;h=5d547b7eab8d3a39b725137425367fe9480d960d;hb=32a385382b73072438c99b533686a4bb9ba4742c;hp=19adf1bf723cb150e6a482abb47817474a36b631;hpb=3baab6cca7423d55ea08288d96570b02380b1fe9;p=blank.git diff --git a/src/controller.cpp b/src/controller.cpp index 19adf1b..5d547b7 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -2,6 +2,7 @@ #include #include +#include #include @@ -25,6 +26,11 @@ glm::mat4 FPSController::Transform() const { } +void FPSController::OrientationVelocity(const glm::vec3 &vel) { + velocity = glm::rotateY(vel, yaw); +} + + void FPSController::Update(int dt) { position += velocity * float(dt); }