Away3d AbstractPrimitive is wrapping faces in bitmap rather than itself

Hey There,

I’m working in Away3d and have hit a road block.

I’m creating an abstract primitive (that looks like a pentagon) made from 5 faces, each of which is determined by dynamically generated vertices.

I can’t just use the regular polygon class because the placement of the object has to be exact.

Here’s the issue: I need to ‘cover’ the abstract primitive in a bitmap. So all five faces need to be covered in one bitmap. But my code (below) results in each face getting covered by its own bitmap. So instead of looking like a pentagon covered with the image, you can see each face individually covered by a different copy of the bitmap.

I’m completely ignorant about all things uv. So that may be the issue.

But I’d appreciate any help.

Thanks.

:red:

var ap:AbstractPrimitive = new AbstractPrimitive();
var bmm:BitmapMaterial = new BitmapMaterial(Cast.bitmap(“roundDoor”));
ap.bothsides = true;
ap.material = bmm;
view.scene.addChild(ap);

var uv0:UV = new UV(0,1);
var uv1:UV = new UV(0,0);
var uv2:UV =new UV(1,1);

ap.addFace(new Face(v1, v2, v3, null, uv1,uv0 ,uv2 ));
ap.addFace(new Face(v4, v5, v6, null, uv0 ,uv1,uv2));
ap.addFace(new Face(v7, v8, v9, null,uv0 ,uv1,uv2));
ap.addFace(new Face(v10, v11, v12, null,uv0 ,uv1,uv2));
ap.addFace(new Face(v13, v14, v15, null,uv0 ,uv1,uv2));