Author Topic: Problem with Object3D.MergeObjects(first,second)  (Read 698 times)

Offline sushobhit

  • long
  • ***
  • Posts: 109
  • future is now
    • View Profile
    • ANDROID APPS
Problem with Object3D.MergeObjects(first,second)
« on: March 02, 2014, 02:44:52 pm »
Hi Friends ,

Let me come straight to point...
I have a Plane , I have two Pyramids , and I have one more Object.
Now I merge these objects One by One into one single Object named EgyptObject using
Roughly :
EgyptObject = Object3D.MergeObjects(EgyptObject,Plane);
EgyptObject = Object3D.MergeObjects(EgyptObject,Pyramid1);
EgyptObject = Object3D.MergeObjects(EgyptObject,Pyramid2); 
EgyptObject = Object3D.MergeObjects(EgyptObject,OtherObject);

Now I have EgyptObject but problem is all Objects stay fixed to SimpleVector.Origin
When I try to translate before merging the translation is erased. And still objects stay fixed at origin.
What I want to to do is place the Objects on different places of the Plane and
a this on a Single Object (EgyptObject). Plz tell how to do it....

I will try to be more specific so as to make it easy to understand the issue :

Pyramid1.translate(0,0,50);   //// Even if I do translate before merge
EgyptObject = Object3D.MergeObjects(EgyptObject,Plane);  /////
EgyptObject = Object3D.MergeObjects(EgyptObject,Pyramid1);  ///// the object still gets fixed to the origin
EgyptObject = Object3D.MergeObjects(EgyptObject,Pyramid2); 
EgyptObject = Object3D.MergeObjects(EgyptObject,OtherObject);

SOS

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11775
    • View Profile
    • http://www.jpct.net
Re: Problem with Object3D.MergeObjects(first,second)
« Reply #1 on: March 02, 2014, 03:49:56 pm »
Merge merges objects in object space. If you want to apply a translation to object space, Have a look at translateMesh().

Offline sushobhit

  • long
  • ***
  • Posts: 109
  • future is now
    • View Profile
    • ANDROID APPS
Re: Problem with Object3D.MergeObjects(first,second)
« Reply #2 on: March 03, 2014, 06:28:48 am »
thanks egon sorry i didnt delete this post actually i got translatemesh using forum search as this issue was posted previously