]> git.localhorst.tv Git - blank.git/blobdiff - src/world/Entity.hpp
first ideas for placing oriented blocks
[blank.git] / src / world / Entity.hpp
index 36f686848e6542353e3c47d20e94fdb9af58902e..b140a08d95d7b21db850ef1966f841ffccf938f3 100644 (file)
@@ -95,7 +95,9 @@ public:
        void SetHead(float pitch, float yaw) noexcept;
 
        /// get a transform for this entity's coordinate space
-       const glm::mat4 Transform() const noexcept { return model_transform; }
+       const glm::mat4 &Transform() const noexcept { return model_transform; }
+       /// get the entity's local up vector
+       const glm::vec4 &Up() const noexcept { return model_transform[1]; }
        /// get a transform for this entity's coordinate space relative to reference chunk
        glm::mat4 Transform(const glm::ivec3 &reference) const noexcept;
        /// get a transform for this entity's view space relative to reference chunk