What arguments I'm missing
dudedude1234 opened this issue · 5 comments
dudedude1234 commented
I'm setting up multiple animations for my model to operate through controls
switch (m_ModelAnimation) { default: DX::ThrowIfFailed( m_animation.Load(L"soldier.sdkmesh_anim") ); break; }
yet I keep getting this error saying there's too few arguments for the function call
walbourn commented
Are you using AnimationSDKMESH
or AnimationCMO
when you declare m_animation
?
dudedude1234 commented
AnimationSDKMESH
walbourn commented
Please post a snippet of code that shows the m_animation
declaration...
dudedude1234 commented
`void Player::CreateDeviceDependentResources()
{
auto device = m_deviceResources->GetD3DDevice();
m_states = std::make_unique<CommonStates>(device);
m_fxFactory = std::make_unique<EffectFactory>(device);
m_model = Model::CreateFromSDKMESH(device, L"soldier.sdkmesh",
*m_fxFactory,
ModelLoader_Clockwise | ModelLoader_IncludeBones);
switch (m_ModelAnimation)
{
default:
DX::ThrowIfFailed(
m_animation.Load(L"soldier.sdkmesh_anim")
);
break;
}
m_animation.Bind(*m_model);
m_drawBones = ModelBone::MakeArray(m_model->bones.size());
}
DirectX::ModelBone::TransformArray m_drawBones;
DX::AnimationCMO m_animation;
`
walbourn commented
You declared:
DX::AnimationCMO m_animation;
You need to change it to:
DX::AnimationSDKMESH m_animation;