Jump to content
  • Advertisement

Archived

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

robert_s

.X car model - rotate wheels

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

Hi. I have a question. I''ve done a car model in max converted it into .X and saved it as one .X file (car.x). Now, I am trying to access each wheel in that model and rotate it whenever the car is in motion. Can I do that directly by using D3DXMESH functions (ie. access just the wheel part of the whole car mesh and rotate just this part) or I should save a wheel in a separate file and then render it 4 times as a separate object which then can be easily rotated? Which way is correct? Can you actually access, move/rotate only certain parts of the .X mesh file so, that the rest of the model stays stationary? Please let me know!

Share this post


Link to post
Share on other sites
Advertisement
yes you can rotate, certian part of .x models while the rest stays the same. I know this because of my dark basic (www.darkbasicpro.com) days but i cant tell you how to do it with DX, iam only a newbei in OpenGL

Share this post


Link to post
Share on other sites
Skinned mesh...paintful...but that''s the only way I can think of other than putting them into separate meshes.

I saw a nice tutorial somewhere on how to use md2 files in DirectX, which looked much simpler than skinned meshes.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
the common framework has a set of classes which will load in each mesh in the .x file as a node in a hierarchy. kind of like a scenegraph heirarchy and similar to the skinned mesh interfaces but much easier to work with. you get a transformation matrix for each mesh which represents the local coordinate system and this is what could be used to rotate the wheels independent of the body. then the entire heirarchy is rendered with one call which walks through the linked lists, rendering each mesh after setting the appropriate concatentated world transform. the names of these classes as CD3DFile, CD3DFrame, and CD3DMesh, i think. if you have the vc++ dx project wisard installed, you can easily generate a new project with the files for these classes inserted into the project with source .cpp and .h files so you can take a look at the code. or just go to the samples\multimedia\common directory of the sdk and look for d3dfile.cpp and .h.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!