If I have a material... and attach it to the object it works fine, but
now I resize the object to other dimensions.. and apply the material
to another side and the material get's really messed up. Is there a
way to fix this? I tried calling the update function of moviematerial
but it has no effect.
if (new int(this.currentSide % 2)) {
this.cube.depth = this.x...@cubewidth;
this.cube.height = this.x...@cubeheight;
this.cube.width = this.x...@cubewidth;
this.cube.rotationY = 90;
this.cube.rotationX = 180;
this.cube.rotationZ = 0;
Tweener.addTween(this.cube, { time:this.x...@animationspeed,
rotationY:(this.cube.rotationY + 90),
transition:'easeOutCubic' } );
} else {
this.cube.depth = this.x...@cubeheight;
this.cube.width = this.x...@cubewidth;
this.cube.rotationY = 180
this.cube.rotationX = 180;
this.cube.rotationZ = 0;
this.cube.cubeMaterials.top = this.frontMaterial;
Tweener.addTween(this.cube, { time:this.x...@animationspeed,
rotationX:(this.cube.rotationX + 90),
transition:'easeOutCubic' } );
}