Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Scooter

Rotation very simple ?

This topic is 5933 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

have some code like the following: D3DXMatrixScaling( &matScale, 1.0f, 1.00f, 1.00f ); D3DXMatrixTranslation( &matTranslate, fObjectPosX, fObjectPosY, fObjectPosZ ); D3DXMatrixRotationZ( &matSpin, fTime/1000); D3DXMatrixMultiply( &plane.matLocal, &matScale, &matTranslate); D3DXMatrixMultiply( &plane.matLocal, &matSpin, &plane.matLocal); g_pd3dDevice->SetTransform( D3DTS_WORLD, &plane.matLocal); what i''m interested is in the Rotation about the Z, I can get the object to rotate a constant speed and then have that speed increasing when i press a key but after you relase the key it goes back to the original constant speed it was rotating at. I want to be able to accelerate it to a speed and have it stay there. It''s been a few months since i''ve done any programming so i''m extreamly rusty.

Share this post


Link to post
Share on other sites
Advertisement
I may have misunderstood your question, but you should probably be increasing your angle by the spin speed:


    
m_fAngle+=m_fSpinSpeed;
D3DXMatrixRotationZ( &matSpin, m_fAngle);


Given that the Angle should be between 0 and 2 * 3.14159.

If you press a key increase your spin speed.


[edited by - sdoherty55 on June 23, 2002 2:10:48 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!