Interactivity on Phong or Gouraud Shaded MovieClip Materials?

1 message Options
Embed this post
Permalink
Lars Schwarz

Interactivity on Phong or Gouraud Shaded MovieClip Materials?

Reply Threaded More More options
Print post
Permalink
hi all,

while playing around i noticed that using interactivity on
movieclipmaterials that
use the gouraud or phong shading doesn't seem to work. i tried the
interactivescene3d
event and "regular" mouse events within the movieclip itself. none fire.

i'm also a bit confused on the shader usage because there are like 2
ways to apply it.

here's a piece of code:

var gouraudMaterial:MovieAssetMaterial;
var gouraudShader:GouraudShader;
var my_Shader:ShadedMaterial;

gouraudMaterial = new MovieAssetMaterial("mymovieclip", true, true, true);
gouraudMaterial.smooth = true;
gouraudMaterial.tiled = true;
gouraudMaterial.baked = true;
gouraudMaterial.interactive = true;
gouraudMaterial.doubleSided = false;
gouraudShader = new GouraudShader(light, 0xFFFFFF, 0x999999, 0);
my_Shader = new ShadedMaterial(gouraudMaterial, gouraudShader);
                       
topPlane = new Plane(gouraudMaterial, CUBEWIDTH,CUBEDEPTH, 1, 6);
topPlane.addEventListener(InteractiveScene3DEvent.OBJECT_CLICK, lookAt);

creating the plane works two ways:

topPlane = new Plane(Shader , CUBEWIDTH,CUBEDEPTH, 1, 6);

which seems right but the plane doesn't get shaded but interactivity works

and:

topPlane = new Plane(gouraudMaterial, CUBEWIDTH,CUBEDEPTH, 1, 6);

which seems wrong but the plane gets shaded but interactivity doesn't work


did i mix up something? thanks in advance: lars

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org