I’m trying to change the material on the face of a cube on mouse over. Right now I’m creating my cube primitive and adding a mouse over listener
var cube:Cube = new Cube({material:cubeMat, width:200, height:50, depth:100});
cube.addOnMouseOver(handleOver);
Inside my handleOver method I have this
private function handleOver(e:MouseEvent3D):void{
var newColor:uint = 0x00B2EE;
e.currentTarget.material = new PhongColorMaterial( newColor,{specular:0.2,shininess:5});
}
This however changes the entire cube’s material. Is there any way to access the individual face dynamically so I can change it’s material?