• Advertisement
Sign in to follow this  

Why is my texture not scrooling

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can someone tell me why is it that after i set a translation and set the Transformation Matrix to D3DTS_TEXTURE0 and apply the translation why is my texture not moving on the Object.Any help would be appreciated thank you

Share this post


Link to post
Share on other sites
Advertisement
Translation of a texture goes into a different spot than translation for objects, because it's a 2D vector, not 3D. Set translation in _31, _32 of the matrix, rather than _41, _42, _43.

Also, you need to enable the transform
pDev->SetTextureStageState(D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2);

and disable it when done
pDev->SetTextureStageState(D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE);

Share this post


Link to post
Share on other sites
Well, I got exactly the same problem 10 minutes ago ;)

Do you do the following when initializing?
device.SetTextureStageState(0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2)

D3DTTFF_COUNT2 means you want a 2D Texture Transformation matrix.

(I did it, and it still doesnt work).

edit: too late...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement