Jump to content
  • Advertisement
Sign in to follow this  
VISQI

Rotating Spheres?

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

[font=arial, verdana, tahoma, sans-serif][size=2]Hey guys.
i am trying to make a motion blur demo, but apparently the rotation of a few spheres together is not working for some reason.
I parsed through that code a lot but couldn't find the missing cog.
here is the code to rotate the World matrix on a circle


void BlurApp::UpdateMovement(float dt)
{
for(int i = 0; i < NUM_OBJECTS; ++i)
{
float theta = mSpheres->Theta;
float r = mSpheres->R;

theta += 1.0f;

float x = r*cosf(theta);
float z = r*sinf(theta);
float y = 0.0f;

mSpheres->PrevWorld = mSpheres->World;

D3DXMatrixTranslation(&mSpheres->World, x, y, z);
}
}

I set the world matrix like ANY other world matrix, the even used the same FX code that i usually use, nothing is new.
The Spheres just sit there, doing nothing...[/font]

Share this post


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

  • 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!