ShapeParams::mMeshScale not found

unclepauly

31-08-2008 20:09:06

i need to scale the physics body upon creation. searching the forums, i have read about the mMeshScale member of ShapeParams, and/or the mesh-scale string param.

i have got NxOgre from http://svn.nxogre.org/branches/1.0/ but mMeshScale is not a member of ShapeParams.

i have done a search for mMeshScale, and it is found in one place, commented out in NxOgreShape.h:


mesh-scale (Vector3)
- Description: Scale any meshes (triangle, convex or heightmap) use with this shape.
- Example: "mesh-scale: 2 2 2"
- See: ShapeParams::mMeshScale


but like i say there is no mMeshScale member.

have i not got the latest code or something ? any help appreciated

betajaen

31-08-2008 20:21:16

NxOgre doesn't scale meshes anymore, it requires taking the, mesh apart going through the vertices to scale them, then cook it.

It's best to scale the mesh using flour.

unclepauly

31-08-2008 20:27:45

ah, i see.

when you say its best to scale the mesh using flour, do you mean that the mesh needs to be scaled 'before' it goes through four (ie scale my model in 3d studio before i export it to .mesh format), or do you mean that there is a parameter i can pass to flour that will scale the .mesh file as i converts to .nxs ? if so, what command ?

i am using this command:

flour meshes type: triangle, in: mymesh.mesh, out: mymesh.nxs

cheers in advance.

betajaen

31-08-2008 20:49:56

You can do both.

But with flour:

flour meshes type: triangle, in: mymesh.mesh, out: mymesh.nxs, scale: 2 2 2

unclepauly

31-08-2008 21:03:03


flour meshes type: triangle, in: mymesh.mesh, out: mymesh.nxs, scale: 2 2 2


hmm, that doesnt seem to be making a difference to the physics mesh. i have scaled 100 100 100 just be sure and its still the same size.

any idea why ? im passing in "model: mymesh.mesh" to createBody, which is, or course, the original size. i dont suppose this has anything to do with anything does it ?

betajaen

31-08-2008 21:12:23

Do'h. I was looking at my flour 0.2 code which has a scale option. You'll have to scale it in your modeler until I release 0.2. But remember you have to scale your scenenode (scale: 10 10 10 in the NodeRenderableParams) because NxOgre doesn't notice or know about such things.

unclepauly

31-08-2008 21:50:22

sorted. a bit more searching found here:

http://www.ogre3d.org/phpBB2addons/view ... lour+scale

so i downloaded the flour source and added the fix and hey presto a nice scaled vehicle.

thanks and goodnight !

betajaen

31-08-2008 22:21:03

Excellent!