Setting up SimpleAnimationControllers using setters
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user