]> git.localhorst.tv Git - blank.git/blobdiff - src/app/FPSController.hpp
some cleaning :)
[blank.git] / src / app / FPSController.hpp
index 88dca64e01d8bbf8872c0f68d2c128a12550b0e7..01c745120d579aa209efc550987be912facc3e10 100644 (file)
@@ -9,13 +9,19 @@
 
 namespace blank {
 
+/// Sets entity rotation and velocity according to stored velocity
+/// and pitch/yaw components.
+/// Rotation is applied in yaw,pitch order (YX). Velocity is relative
+/// to yaw only (Y axis).
 class FPSController {
 
 public:
        explicit FPSController(Entity &) noexcept;
 
+       /// get position and face direction of controlled entity
        Ray Aim() const noexcept { return entity.Aim(entity.ChunkCoords()); }
 
+       /// velocity, relative to heading (yaw only)
        const glm::vec3 &Velocity() const noexcept { return velocity; }
        void Velocity(const glm::vec3 &vel) noexcept { velocity = vel; }