]> git.localhorst.tv Git - blank.git/blobdiff - src/model/model.cpp
use entity's eyes to aim
[blank.git] / src / model / model.cpp
index 55050e0b72d856ce57894787705c0630cbc981a3..451433bc7e8296d38b37c551883598553ab13248 100644 (file)
@@ -27,6 +27,10 @@ Instance::~Instance() {
 
 }
 
+glm::mat4 Instance::EyesTransform() const noexcept {
+       return model->GetEyesPart().GlobalTransform(*this);
+}
+
 void Instance::Render(const glm::mat4 &M, DirectionalLighting &prog) {
        model->RootPart().Render(M, *this, prog);
 }
@@ -35,7 +39,8 @@ void Instance::Render(const glm::mat4 &M, DirectionalLighting &prog) {
 Model::Model()
 : id(0)
 , root()
-, part() {
+, part()
+, eyes_id(0) {
 
 }