I have a ObjectContainer3D with several meshes to which i’ve applied a SimpleShadow effect.
I modify the geometry of some meshes by scaling them, but the shadow doesn’t update with the geometry.
I guess that after rescaling i have to apply the scaling transformation, (as the option is available in Prefab3D) but i can’t see a method ApplyScale or something similar.
Some pieces of my code
private function initObjects():void
{
var loader:Loader3D = AWData.load("../assets/bureau3/Bureau3.awd");
loader.addEventListener(Loader3DEvent.LOAD_SUCCESS, onLoadComplete);
}
private function onLoadComplete(e:Loader3DEvent):void
{
myTrace.appendText("\n onLoadComplete");
myContainer = e.loader.handle as ObjectContainer3D;
myContainer.x = 0;
myContainer.y = 0;
myContainer.z = 0;
myContainer.scale(1);
scene.addChild(myContainer);
// adding shadows
ssShadow = new SimpleShadow(myContainer, 0xff555555,32,-15);
ssShadow.apply(view.scene);
// Modify geometry of one mesh by rescaling it
var plateau:Mesh = myContainer.getChildByName("pgauche") as Mesh;
plateau.scaleX = 0.5;
}
}
Anyone has an idea on this issue?