# Very unevenly distributed animation speed.

This topic is 1964 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I am using panda exporter. I chose the other one, not 3ds ticks, forgot its name.

Then I have coding like this,

    if( SUCCEEDED(beginScene()) )

{

D3DXMATRIXA16 mViewProj = D3DXMATRIXA16((float*)&ViewMatrix()) * D3DXMATRIXA16((float*)&ProjMatrix());

// DX10 spec only guarantees Sincos function from -100 * Pi to 100 * Pi

//float fBoundedTime = (float) m_fTime - (floor( (float) m_fTime / (2.0f * D3DX_PI)) * 2.0f * D3DX_PI);

float deltaTime = static_cast<float>((timeGetTime() - m_fTime)  * 0.001f);

m_fTime = timeGetTime();

//m_pConstantTable->SetMatrix( g_pDevice, "mWorldViewProj", &mWorldViewProj );

//m_pConstantTable->SetFloat( g_pDevice, "fTime", fBoundedTime );

g_pEffect->SetMatrix("matVP", &mViewProj);

g_pEffect->SetVector("lightPos", &D3DXVECTOR4(0.0f, -1.0f, 0.0f, 0.0f));

//g_pEffect->SetFloat("fTime", fBoundedTime);

for (int i = 0; i < m_vRenderObjects.size(); i++)

{

D3DXMATRIX mat = m_vRenderObjects->GetWorldMatrix();

m_vRenderObjects->GetMesh()->Update(mat, deltaTime);

m_vRenderObjects->GetMesh()->Draw();

}

endScene();

}


The third chance is that the idle messages don't come in a regular manner. I am using QT4.

Sometimes the character is going fast and sometimes it's slowing down in application mode. I am sure I rigged the character well.

I set a keyframe at each 33ms interval and it plays back well in 3ds max.

##### Share on other sites

The uneven stuff has been resolved.

But I've got another one.

If the elapsed time between each frame is the same, the model doesn't seem to move at all.

The elapsed time seems to have to be varying in order to be correct. Am I right?

Thanks

Jack

##### Share on other sites

Not entirely sure what you mean, but here's a thought. If your time delta becomes zero, your animation will not advance. This can happen when your timer resolution isn't high enough to measure the deltas. What timer are you using? Try using a high resolution timer.

1. 1
2. 2
Rutin
23
3. 3
4. 4
frob
16
5. 5

• 9
• 33
• 13
• 12
• 10
• ### Forum Statistics

• Total Topics
632579
• Total Posts
3007168

×