Cube Face Layout changed a while back… Can’t figure it out…

Software: Away3D 4.x

Mr Margaret Scratcher, Sr. Member
Posted: 29 February 2012 02:11 AM   Total Posts: 344

Hi there, I’m trying to make a number cubes with different images on each face, which I achieve previously, but then the layout for the cube changed, and none of the images were aligned properly…

If you check out :
http://www.margaretscratcher.co.uk/projects/VirtualEmporium/index.html

Ypu can see all the cubes (DVD cases) loading, which at the moment use this test layout:

http://www.margaretscratcher.co.uk/projects/VirtualEmporium/caseTemplate.jpg..

This was previously rotated 90 degrees clockwise, and working perfectly, with each of those coloured areas covering a face.

Rotating it as it is now means the front and back faces are okay, but the edges are wrong, and the top and bottom faces both use Square number 5…

 

   

Mr Margaret Scratcher, Sr. Member
Posted: 29 February 2012 02:45 AM   Total Posts: 344   [ # 1 ]

Oh, click and drag to look around, WASD to move the camera..

   

John Brookes, Moderator
Posted: 29 February 2012 03:06 AM   Total Posts: 732   [ # 2 ]

Cubes Uvs have been messed up for a while.
This is for the old alpha, but may still work,

forum/viewthread/1636/

   

Mr Margaret Scratcher, Sr. Member
Posted: 29 February 2012 03:46 AM   Total Posts: 344   [ # 3 ]

Hmm… had a quick go, but not that simple due to the new way of making a cube:

var cube:Mesh;
   var 
cubeGeometry:CubeGeometry = new CubeGeometry404040101010);
   
cube = new Mesh(cubeGeometry_material); 


Hmmm I’ll have another look tomorrow, or make 6 planes and merge them…

   

John Brookes, Moderator
Posted: 29 February 2012 12:31 PM   Total Posts: 732   [ # 4 ]

Just remove
[ material:MaterialBase = null ]
from the main function
and
[ material ]
from the super()

Should then work

   

Mr Margaret Scratcher, Sr. Member
Posted: 29 February 2012 07:16 PM   Total Posts: 344   [ # 5 ]

Okee dokes gonna have a peek…

I might also see if I can figure out how you got from the old Cube.as to your code, and see if I can make those same changes in CubeGeometry.as

   

Mr Margaret Scratcher, Sr. Member
Posted: 29 February 2012 09:42 PM   Total Posts: 344   [ # 6 ]

Right, ignore that above post, I ammended CubeJB.as as you suggested, and yeah, I can confirm it works exactly as expected..

TOP WORK!

I’ve renamed CubeGeometry.as to CubeGeometryOLD.as and now using CubeJB in its place…

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X