Skip to content

Commit

Permalink
Added groups
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-beqiraj committed Feb 4, 2025
1 parent 1308f11 commit 9673ea3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
9 changes: 9 additions & 0 deletions Engine/src/Helpers/Interpolator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,16 @@ glm::mat4 Prisma::Interpolator::next(float dt) {
glm::quat rotB = glm::quat_cast(m_timeframe[nextIndex].position);
glm::quat interpRot = glm::slerp(rotA, rotB, alpha);

glm::vec3 scaleA = glm::vec3(glm::length(m_timeframe[m_currentIndex].position[0]),
glm::length(m_timeframe[m_currentIndex].position[1]),
glm::length(m_timeframe[m_currentIndex].position[2]));
glm::vec3 scaleB = glm::vec3(glm::length(m_timeframe[nextIndex].position[0]),
glm::length(m_timeframe[nextIndex].position[1]),
glm::length(m_timeframe[nextIndex].position[2]));
glm::vec3 interpScale = glm::mix(scaleA, scaleB, alpha);

glm::mat4 result = glm::mat4_cast(interpRot);
result = glm::scale(result, interpScale);
result[3] = glm::vec4(interpPos, 1.0f);
return result;
}
Expand Down
5 changes: 2 additions & 3 deletions UserEngine/src/UserEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void UserEngine::start()

void UserEngine::update()
{
//m_player->update();
m_player->update();
}

void UserEngine::finish()
Expand All @@ -43,6 +43,5 @@ void UserEngine::finish()

std::shared_ptr<Prisma::CallbackHandler> UserEngine::callbacks()
{
auto callback = std::make_shared<Prisma::CallbackHandler>();
return callback;
return m_player->callback();
}

0 comments on commit 9673ea3

Please sign in to comment.