I'm trying to align objects other than TextField3D to a path using
PathAlignModifier, but the loops in the execute() method are
contingent upon the vertices of the faces in the _originalMesh.
However, these vertices aren't cloned when the face is cloned.
I was able to get this to work by altering the duplicateMesh() method
(see below), but I'm not exactly sure if this is the best solution.
Please advise!
Thanks,
Casey
BEFORE =======================================
private function duplicateMesh(mesh:Mesh):void
{
_activeMesh = mesh;
_originalMesh = new Mesh();
for each(var face:Face in mesh.faces)
{
_originalMesh.addFace(face.clone());
}
}
AFTER =======================================
private function duplicateMesh(mesh:Mesh):void
{
_activeMesh = mesh;
_originalMesh = new Mesh();
for each(var face:Face in mesh.faces)
{
//duplicate the vertices
var clone:Face = face.clone();
clone.v0 = face.v0.clone();
clone.v1 = face.v1.clone();
clone.v2 = face.v2.clone();
_originalMesh.addFace(clone);
}
}
--
Subscription settings: http://groups.google.com/group/away3d-dev/subscribe?hl=en