move player animation to base:player_animator component
This commit is contained in:
+1
-15
@@ -170,23 +170,9 @@ void Player::postUpdate() {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: ERASE & FORGET
|
||||
auto& skeleton = entity->getSkeleton();
|
||||
|
||||
skeleton.visible = currentCamera != fpCamera;
|
||||
|
||||
auto body = skeleton.config->find("body");
|
||||
auto head = skeleton.config->find("head");
|
||||
|
||||
if (body) {
|
||||
skeleton.pose.matrices[body->getIndex()] = glm::rotate(
|
||||
glm::mat4(1.0f), glm::radians(rotation.x), glm::vec3(0, 1, 0)
|
||||
);
|
||||
}
|
||||
if (head) {
|
||||
skeleton.pose.matrices[head->getIndex()] = glm::rotate(
|
||||
glm::mat4(1.0f), glm::radians(rotation.y), glm::vec3(1, 0, 0)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void Player::teleport(glm::vec3 position) {
|
||||
|
||||
Reference in New Issue
Block a user