-void Entity::UpdateView() noexcept {
- // create local transform
- view_local = Transform(ChunkCoords());
- // clear the translation part
- view_local[3] = glm::vec4(0.0f, 0.0f, 0.0f, 1.0f);
- // add the model's eyes translation, if any
+void Entity::UpdateTransforms() noexcept {
+ // model transform is the one given by current state
+ model_transform = state.Transform(state.chunk_pos);
+ // view transform is either the model's eyes transform or,
+ // should the entity have no model, the pitch (yaw already is
+ // in model transform)