I've just done a quick example of what I mean in 3dmax, in case my
ramberlings didn't make sense :)

http://www.funkyjunk.me.uk/imagesforExternals/away3d/lineExample.jpg


On Dec 15, 7:24 pm, colouredfunk <[email protected]> wrote:
> Hello,
>
> I am trying to create a simple line between several points/objects in
> my 3D scene.
>
> The line doesn’t need to have any curves but it would need to be
> around 50 pixels wide. The points will be in all different positions
> so the line will need to retain it's shape on angles etc...
>
> I’m using the following code that I’ve taken from various examples,
> but I get a compile error ([Fault] exception, information=TypeError:
> Error #1009: Cannot access a property or method of a null object
> reference. (PathUtils.as) when I use my pos Array for the path.
>
> Please can someone help me out.
>
> Many many thanks
>
> var mat:Material = new WireframeMaterial("yellow", {width:20});
> var pos:Array = new Array
>                         for each (var obj3D:Object3D in room.children)
>                         {
>                                 if (obj3D.name.substr(0,3) == "Box") 
> pos.push(obj3D.position);
>
>                         }
> var aPath:Path = new Path(pos)
>
> var aPoints:Array = [];
>                         aPoints.push(new Vector3D(-100, 0, 0));
>                         aPoints.push(new Vector3D(-50, 0, 0));
>                         aPoints.push(new Vector3D(-50, -50, 0));
>
> var rotationPoints:Array = new Array();
>                         rotationPoints.push(new Vector3D(0, 0, 0));
>                         rotationPoints.push(new Vector3D(-20, 0, 0));
>                         rotationPoints.push(new Vector3D(20, 0, 0));
>
> var pathextrude:PathExtrusion = new PathExtrusion(aPath, aPoints,
> null, rotationPoints, { flip:true, aligntopath:true, coverall:false,
> scaling:1, recenter:true, material:mat, subdivision:18 } );
>                         scene.addChild(pathextrude);

Reply via email to