SegmentSet bug in 4.1.4 [Solved]

Software: Away3D 4.x

Acrossfy, Newbie
Posted: 10 August 2013 11:45 AM   Total Posts: 4

Hi, i found bug with SegmentSet in last Away3D release. If i once created SegmentSet it works normal, but if I dynamically add segments, SegmentSet is not shown.

For example, this code works:

private function init():void
{
 _lineSet 
= new SegmentSet();
 
_view.scene.addChild(_lineSet);

 for(var 
i:uint3; ++i)
 
{
  
var start:Vector3D = new Vector3D(Math.random() * 500Math.random() * 500Math.random() * 500);
  var 
end:Vector3D = new Vector3D(Math.random() * 500Math.random() * 500Math.random() * 500);
  var 
line:LineSegment = new LineSegment(startend0xFFFFFF Math.random());
  
_lineSet.addSegment(line);
 
}

 stage
.addEventListener(Event.ENTER_FRAMEhandleEnterFrame);
}

private function handleEnterFrame(event:Event):void
{
 _view
.render();

This code not works:

private function onMouseUp(event:MouseEvent3D):void
{
 
var start:Vector3D = new Vector3D(Math.random() * 500Math.random() * 500Math.random() * 500);
 var 
end:Vector3D = new Vector3D(Math.random() * 500Math.random() * 500Math.random() * 500);
 var 
line:LineSegment = new LineSegment(startend0xFFFFFF Math.random());
 
_lineSet.addSegment(line);

And this code too:

private function handleEnterFrame(event:Event):void
{
 
var start:Vector3D = new Vector3D(Math.random() * 500Math.random() * 500Math.random() * 500);
 var 
end:Vector3D = new Vector3D(Math.random() * 500Math.random() * 500Math.random() * 500);
 var 
line:LineSegment = new LineSegment(startend0xFFFFFF Math.random());
 
_lineSet.addSegment(line);

 
_view.render();

P.S. due to this bug, DebugDraw doesn’t work in AwayPhysics.

   

Acrossfy, Newbie
Posted: 10 August 2013 12:47 PM   Total Posts: 4   [ # 1 ]

I resolved this problem.
I just tried to use this pull request and now all works fine!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X