Moving linesegment start and end points (3.6)

Software: Away3D 3.x

ralphB, Newbie
Posted: 24 April 2012 07:02 PM   Total Posts: 9

What is the appropriate way to move the start and end vertices of a LineSegment primitive?  If I say:

  var ls:LineSegment = new LineSegment();
  ls.start = new Vertex(0,0,0);
  ls.end = new Vertex(5,0,0);

then I render, it works the first time, but if I then say:
  ls.end = new Vertex(10,20,30);
and render again, the line segment does not change.

Should I be using the p1 and p2 properties?

Should I be using this?
  ls.updateVertex( ls.end, 10, 20, 30);
but that doesn’t seem to work either.

The only way to move the start/end points around seems to be to remove the LineSegment object and create a new one, which is very very slow.

Any suggestions?
Thanks!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X