Hi Blue
I've tried your code, and it's working now.
// these are your previous codes
var car:ferrari = new ferrari();
car.material = new BitmapMaterial((new bmpMat() as Bitmap).bitmapData,
{ smooth:true } );
The problem is you set a material to an ObjectContainer3D, because
ferrari variable is an ObjectContainer3D.
solution :
// set material to the body of your ferari
(car.getChildByName("body") as Mesh).material = new
BitmapMaterial((new bmpMat() as Bitmap).bitmapData, { smooth:true } );
or if all children in ferari use the same material:
var mymaterial:BitmapMaterial = new BitmapMaterial((new bmpMat() as
Bitmap).bitmapData, { smooth:true } );
for each (var m:Mesh in car.children)
{
if (m == null) continue;
m.material = mymaterial;
}
On Sep 12, 2:25 am, blue <[email protected]> wrote:
> Thanks to both of you for the pointers, I now have a little idea about
> the way to go. I am still reading the book and haven't reached far,
> but just in case, are there any simple examples on accessing faces?
> And how can I generate collision maps?
>
> The sample projects that come with away3d seems to have a lot of
> useful info, and one of them uses the collision map for collision
> detection, and that seems very useful to me.