Author Topic: merging objects and keeping translation  (Read 3456 times)

Offline manumoi

  • long
  • ***
  • Posts: 121
    • View Profile
    • http://www.iro.umontreal.ca/~blanchae
merging objects and keeping translation
« on: September 17, 2007, 03:56:30 pm »
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

Offline manumoi

  • long
  • ***
  • Posts: 121
    • View Profile
    • http://www.iro.umontreal.ca/~blanchae
Re: merging objects and keeping translation
« Reply #1 on: September 17, 2007, 04:02:43 pm »
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