Simple question about merging two meshes

Software: Away3D 4.x

empend, Member
Posted: 12 January 2012 04:26 AM   Total Posts: 77

I have two meshes places at different positions, and would like them to stay at their positions when merged.
This is for a performance boost.

Is there any way to make what I am expecting to happen, happen?

It would be nice to be able to, let’s say, take a couple of random/dynamically placed low poly flowers, and merge them so they are not 20 individual objects.

PS.
I tried merging two meshes, but it would work unless it was added to a container.
Would be nice if you didn’t have to do that!

Thanks to everyone who spends some time to answer my question!

   

Avatar
Fabrice Closier, Administrator
Posted: 12 January 2012 09:13 AM   Total Posts: 1265   [ # 1 ]

you can merge 3 ways:

Merge.applyToContainer(container);

Merge.applyToMeshes(Vector.<Mesh>);

Merge.apply(receiver,source)

in your case the last one should do just fine. Make sure you set properly the disposeSource and keepMaterial properties.

   

empend, Member
Posted: 12 January 2012 08:51 PM   Total Posts: 77   [ # 2 ]

Will the mesh keep its same position visually?

So I have created 2 identical cubes, but both have different positions, and rotation.
If I merge them will it look exactly the same, but just using one mesh?

I know it’s annoying dealing with unlimited problems posted by people you don’t even know, but I really want to be able to do this.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X