Blender2Ogre - Mesh position stored in .mesh file

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
User avatar
Hydrocity
Halfling
Posts: 45
Joined: Tue Oct 02, 2012 4:49 am
Location: United States
x 5

Blender2Ogre - Mesh position stored in .mesh file

Post by Hydrocity »

I'm using Blender2Ogre for the .scene format, which has been working great--until I wanted to move individual meshes (or submesh, perhaps?) in the scene. I'm using Bullet Physics for collision, and that all works fine. I've run into a problem when trying to create a "moving platform" from one of the meshes in the scene. It seems it's impossible to obtain the world position of an individual mesh.

In the .scene file, under every node it looks the same:

Code: Select all

<position y="0.000000" x="0.000000" z="-0.000000" />
And when I open each .mesh file in Ogre Meshy it is not located at the center, since it stores its own offset in the .mesh file, it would seem. I can call getPosition(), _getDerivedPosition(), getInitialPosition(), or _getWorldAABB().getCenter() on the associated scene node (and it's parents, etc.) and all return (0, 0, 0). So when I am trying to add a rigid body from Bullet, it just ends up at the origin and not where the cube appears on the screen.

I've tried changing all of the options in the exporter in Blender, and nothing seems to change the way it's saving the information in the .scene and .mesh files. I may have messed up the configuration somewhere, I'm not sure. Is this even a feasible option for Blender2Ogre? Or should I look into another exporter/modify the python script myself?
User avatar
Hydrocity
Halfling
Posts: 45
Joined: Tue Oct 02, 2012 4:49 am
Location: United States
x 5

Re: Blender2Ogre - Mesh position stored in .mesh file

Post by Hydrocity »

Please forgive me, I discovered it was because I'm moving all my objects in edit mode and not object mode. I had previously decided to do this due to complications with setting up the collision world in Bullet, but it seems to be working now.