[Papervision3D] Collada help
Amy Casson
amy at littleloud.com
Tue Nov 20 07:30:22 PST 2007
Hi all,
Is it possible to add a plane to a collada scene? Or get the collada
scene and the plane to share the same container.
I am trying to do this so that my plane sits at the same angle as my
collada.
You can see my class below
Any advice much appreciated :-)
package
{
import flash.display.MovieClip;
import org.papervision3d.core.proto.SceneObject3D;
import org.papervision3d.objects.Plane;
import org.papervision3d.scenes.Scene3D;
import org.papervision3d.components.as3.flash9.PV3DColladaScene;
import org.papervision3d.objects.DisplayObject3D;
public class Main extends MovieClip
{
public function Main()
{
trace("Main constructor")
scene3d.addEventListener(PV3DColladaScene.SCENE_COMPLETE, handleInit);
}
function handleInit(...rest):void
{
var $collada:DisplayObject3D =
scene3d.scene.getChildByName("5");
var $colladaScene:SceneObject3D =
$collada.scene;
$collada.scaleX = $collada.scaleY =
$collada.scaleZ = 0.5
var $plane:Plane=new Plane(null,100,100,1,1);
$colladaScene.addChild($plane);
scene3d.scene.renderCamera(scene3d.camera);
}
}
}
Amy Casson
Developer
Littleloud
1 Sydney Street, Brighton, BN1 4EN
01273 625 066
<http://www.littleloud.com/> http://www.littleloud.com
The information in this email is confidential and may be legally subject to
our copyright and general intellectual property rights. It is intended
solely for the addressee. Any unauthorised disclosure, copying or
distribution is prohibited and may be unlawful. Because e-mail can be
altered electronically, the integrity of this communication cannot be
guaranteed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20071120/cba13248/attachment-0001.html
More information about the Papervision3D
mailing list