# BasicEffect and SkinnedEffect treating WorldViewProj differently? [closed]

I made a ModelBatch class that batches and draw rigged/unanimated and skinned/animated models. For now, BasicEffect is assigned to rigged models (XNA Model Processor) and SkinnedEffect is assigned to skinned models (Based on Microsoft's Skinned Model Sample). The problem occurs when setting the shaders parameters. In the RenderBatch() method, I wrote:

...
foreach (Effect effect in mesh.Effects)
{
if (effect is BasicEffect) // if it's a rigged model.
{
effect.Parameters["WorldViewProj"].SetValue(modelInfo.world * viewProjection);
}

else // it's a skinned model.
{
effect.Parameters["WorldViewProj"].SetValue(viewProjection);
effect.Parameters["Bones"].SetValue(modelInfo.boneTransforms);
}
}
...


When running the game, the rigged model's position is locked to the camera position for the first few frames. Afterwards, everything works perfectly (the rigged model position's is correct). The skinned model doesn't have that position displacement problem at runtime even if I only set the "WorldViewProj" parameter (so it's not because of the "Bones" parameter).

In order to work perfectly, I had to changed the rigged model part to:

    if (effect is BasicEffect) // if it's a rigged model.
{
BasicEffect basicEffect = effect as BasicEffect;

basicEffect.World = modelInfo.world;
basicEffect.View = this.camera.View;
basicEffect.Projection = this.camera.Projection;
}


This way, the rigged model is instantly placed at the right place, but I don't like it. Also, what is really stange is that if I do not set any view or projection for the rigged model, like this:

    if (effect is BasicEffect) // if it's a rigged model.
{
// do nothing.
}


I will still see the rigged model locked to the camera's position. Anyone knows why setting "WorldViewProj" parameter of a SkinnedEffect works perfectly, but not for a BasicEffect?

I hope there's enough informations and thank you for answering!