LineSegment issue

Software: Away3D 4.x

iansen, Newbie
Posted: 13 February 2013 10:42 AM   Total Posts: 17

Hello everyone,

I’m using LineSegment like this:

var sgm:SegmentSet=new SegmentSet()
view.scene.addChild(sgm);
sgm.addSegment(new LineSegment(new Vector3D(000), new Vector3D(10000),0x000000,0xFFFFFF,10)); 

but when I move the camera away from the SegmentSet ( in any direction) the segments seem to rotate to face the camera and keep their width (they get wider and shorter as I go further from them with the camera). I’m kind of new to away3d… so I want to know if this is normal behavior or I am doing something wrong ? I use the latest .swc(away3d-core-fp11_4_1_0_Alpha.swc) in my project.

If this is normal behavior for LineSegment how would I go about tracing a line on top of a plane? - I’m trying to leave some line marks on top of a plane.

Thanks

 

   

Avatar
80prozent, Sr. Member
Posted: 14 February 2013 02:21 AM   Total Posts: 430   [ # 1 ]

Hi

i think this is expected behaviour.

you could use a normal mesh instead.

instead of defining the rectangle (the line) by 2 verticles and a thickness, you would have to define it by 4 verticles.

something like this:

vertexData.push(v1,v2,v3,v4)
indexData.push(1,2,3,2,3,4)

hope that makes sense

 Signature 

sorry…i hope my actionscript is better than my english…

   

iansen, Newbie
Posted: 16 February 2013 07:18 PM   Total Posts: 17   [ # 2 ]

Thanks. I’ll give it a try.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X