tiling bitmap FAIL. but why?

Software: Away3D 4.x

maneatingsheep, Newbie
Posted: 05 January 2012 12:51 PM   Total Posts: 12

trying to tile some floor tiles, but it comes out stretched to the size of the plane. any ideas?

var floor:BitmapData = new BitmapData(6464false0xFFFFFFFF);
floor.fillRect(new Rectangle(001010), 0);
floorMat = new BitmapMaterial(floorfalsetruefalse);
floor = new Plane(floorMat350 DRAW_RATIO350 DRAW_RATIO11); 
   

Alex Bogartz, Sr. Member
Posted: 05 January 2012 04:25 PM   Total Posts: 216   [ # 1 ]

You have to set the material to repeat=true, then do something with the UVs.

plane.geometry.scaleUV(3,3);

Sorry, I’m away from my machine, but that should get you close.

   

Avatar
vonWolfehaus, Newbie
Posted: 05 January 2012 11:48 PM   Total Posts: 14   [ # 2 ]

geometry.scaleUV() only takes one parameter, but even so I couldn’t get it to work. I’m swapping materials in and out often but the materials all have repeat to true. Is this a bug with v4?

   

Avatar
Fabrice Closier, Administrator
Posted: 11 January 2012 02:20 PM   Total Posts: 1265   [ # 3 ]

if you have only one param, you are not using the latest build.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X