Hi all,
i am trying to create a cube that uses a different texture on each
face. For testing purposes I created a bitmap image with a size of
256x512 px. Each side has a different color and the bitmap has six
tiles in a 2x3 grid (2 columns x 3 rows).

As I understand the API correctly this should result in a dice that
has a different color on each face. However the bitmap is not mapped
as I expected. Some colors appear on 2 sides some and other colors are
not used at all. Btw.: I am also using the new jiglib version for
broomstick.

Here is my code:

[Embed(source="../textureTest.jpg")] private var AssetClass:Class;
private var diceTexture:Bitmap = new AssetClass() as Bitmap;
private var mat:BitmapMaterial = new
BitmapMaterial(diceTexture.bitmapData, true, true, false);
...
cube = world.physics.createCube(mat, 37, 37, 37);
...


Any hints what I got wrong? Thanks in advance!

Reply via email to