Hey,
So I'm working on a project, and I've created a 3D scene with particles and everything how I need it.. I'm hoping to use the PV3D2.0 LensFlare class to add a lens flare to the scene. I have all the lensflare movieclips set up, and I'm using the following code to instantiate the LensFlare, but I'm getting the error
TypeError: Error #1034: Type Coercion failed: cannot convert org.papervision3d.core.effects.objects::LensFlare@34723f41 to org.papervision3d.objects.DisplayObject3D.
var light:PointLight3D
var lf:LensFlare;
var h1:MovieClip = new HaloMC();
h1.filters = [new BlurFilter(4,4,2)];
var h2:MovieClip = new HaloMC2();
h2.filters = [new BlurFilter(4,4,2)];
var h3:MovieClip = new HaloMC5();
h3.filters = [new BlurFilter(4,4,2)];
var flArray:Array = [new MainFlareMC(), new HaloMC4(), h1, new FlareMC(), h2, new FlareMC(),h3, new FlareMC() ];
light = new PointLight3D(false);
light.x = 3000;
light.z = 10000;
lf = new LensFlare(light,flArray,viewport.width,viewport.height);
scene.addChild(lf);
I found a LensFlare tutorial (which is where I got the array and movieclips from) from 2008 but it's not compatible with Great White, so I'm trying to recreate it using the new API.