Setting up SimpleAnimationControllers using setters

This commit is contained in:
Vladyslav Baranovskyi
2024-06-05 22:05:40 +03:00
parent 7111e46954
commit afddc987a2
3 changed files with 14 additions and 12 deletions

View File

@@ -61,9 +61,15 @@ namespace OpenVulkano
m_cameraControl.Init(&m_camera);
m_cameraControl.SetDefaultKeybindings();
m_animationController = std::make_unique<OpenVulkano::Scene::SimpleAnimationController>();
m_animationController->SetNode(&m_node);
m_animationController->SetDuration(3);
OpenVulkano::Math::Pose srcPose(OpenVulkano::Math::Quaternion<float>(), OpenVulkano::Math::Vector3f_SIMD(-3, 0, 0));
m_animationController->SetInitialPose(srcPose);
OpenVulkano::Math::Pose destPose(OpenVulkano::Math::Quaternion<float>(), OpenVulkano::Math::Vector3f_SIMD(3, 0, 0));
m_animationController = std::make_unique<OpenVulkano::Scene::SimpleAnimationController>(&m_node, srcPose, destPose, 3);
m_animationController->SetTargetPose(destPose);
}
void Tick() override