DirectXTK12 icon indicating copy to clipboard operation
DirectXTK12 copied to clipboard

Wiki Issue for Getting Started -> Animating using model bones

Open focusright opened this issue 10 months ago • 3 comments

In this wiki documentation

https://github.com/microsoft/DirectXTK12/wiki/Animating-using-model-bones#modifying-model-bones

The result does not match the screenshot provided. The problem can be addressed either in the model or the CreateLookAt() function in Game::CreateWindowSizeDependentResources(). Since I don't have the original source file of the model I fixed it in the code with

void Game::CreateWindowSizeDependentResources()
{
    // TODO: Initialize windows-size dependent objects here.

    auto size = m_deviceResources->GetOutputSize();
    m_view = Matrix::CreateLookAt(Vector3(10, 2, 0),
        Vector3(0, 2, 0), Vector3::UnitY);
    m_proj = Matrix::CreatePerspectiveFieldOfView(XM_PI / 4.f,
        float(size.right) / float(size.bottom), 0.1f, 10000.f);
}

The main fix being in changing the Vector3 parameters in the CreateLookAt() function.

focusright avatar Mar 27 '24 06:03 focusright