ScenePosition should return you what you want...

However, depending on exporter or if you use the as3 exporter, the pivot point might be added as well.
visually, you see the offset yet the scenePosition keeps returning 0,0,0

this means that a vertex (0,0,0) in a group placed at (100,100,100) in your editor might be translated during export. As a result the outputed vertexes might be set to 100, 100, 100
asking position or sceneposition would allways return 0,0,0

to fix if this is the case, simply recenter your mesh,
like this:

m == your Mesh instance;
m.applyPosition( (m.minX+m.maxX)*.5, (m.minY+m.maxY)*.5, (m.minZ +m.maxZ)*.5);

then ask the scenePosition or position...

Fabrice


On May 14, 2009, at 2:21 PM, ben wrote:


Hi,
that's must be a simple question but :
I need to get the global positon (/scene or objectContainer3d) of some
objects in a 3ds imported scene...
(that simply would be impossible to place them in away, or as other
3ds scene... need to use the 3ds API and a whole scene),
but the position of a object always return 0,0,0, and the
transform.forward vector, 000...

var phono:Mesh = e.target.handle.children[0] as Mesh;
trace(phono.position,phono.transform.forward);
}

Is they're any way to get them ?

Ps: I need them on the fly, not read them in 3ds...

thanks


Reply via email to