Go Back   AC3D Forums > General > AC3D General
Register FAQ Members List Calendar Today's Posts

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 12th August 2005, 08:18 AM   #1
M1ka
Junior Member
Junior member
 
Join Date: Aug 2005
Posts: 4
Default Exporting to .x

Hi all,

I have a problem exporting meshes to .x files:

Even if I (re-)center the object center, when I import the mesh to my DirectX app, the object rotates strangely.

I tested this by creating a 1 x 1 x 1 size cube, centered in origin.

If I rotate it about the z-axis, the rotation center seems to be off a bit, so the cube appears to move. When I do the same thing with a cube created with the mesh viewer that comes with the DirectX SDK, it rotates perfectly around the center.

I calculate the bounding box for the mesh with the D3DX function D3DXComputeBoundingBox, and then I calculate the center by
cnt = (min + max) / 2

Since I'm quite new to DirectX the bug is probably in my code. Does anyone have any idea of how to fix this?

Thanks,

M
M1ka is offline   Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 08:06 AM.


AC3D Forum
(C) Inivis Limited 2020