merging objects and keeping translation

Started by manumoi, September 17, 2007, 03:56:30 PM

Previous topic - Next topic

manumoi

Hello everybody, got a little problem

I m doing more or less a tile based level editor. Each tile is refering to an Object3D... For some kind of tile I will need to do the combination of two Objects. I will naturally merge them. But it seems that mergeObjects doesn t keep a previous translation aimed at positioning the first object depending on the second.
For instance I have two objects : a square and a tree, and i want to obtain one final object (the tree in the middle of the square). Even if i use different combinations of setOrigin setCenter or translate, after merging, the tree remains at one corner of my square.

Unfortunately i have to have only one Object3D as a result so i can t use a child-parent relation between 2 Object3D.
So my questions are :
Do i correctly understand that merge object will not keep previous translation ?  (which i can understand)
- If yes, is there a way to do something similar and to obtain only one final object,  ???
- if no, what is the exact process behind merge object in order that I understand where my problem is.  ???

Thanks

manumoi

Sorry guys, just found the solution in a previous post (i.e. making the translation permanent by confirming it with translateMesh() ).

So no more question   :P