No MouseEvent3D fired on WireFramePrimitive

Software: Away3D 4.x

aeki, Member
Posted: 26 February 2013 09:21 PM   Total Posts: 73

I have a basic WireFramePrimitive object

public class myWireFrame extends WireframePrimitiveBase
 {
  
var handle_M Mesh;
  
  public function 
myWireFrame(color:uint=0xffffffthickness:Number=1)
  
{
   
   super
(colorthickness);
   
this.mouseEnabled true;
   
this.addEventListener(MouseEvent3D.MOUSE_OVERonMouseOver);
  
}
  
  
protected override function buildGeometry():void{
   this
.addSegment( new LineSegment(new Vector3D(), new Vector3D(1000,0,0),0x003333,0x00333310));
  
}
  
  
private function onMouseOver(e:MouseEvent3D):void{
   trace
('Seg onMouseOver');
  
}  
 } 

I add myWireFrame object without any problem to my scene, but no MouseEvent3D is fired on MOUSE_OVER.

Is it a bug?

Am i missing something?

   

Avatar
Fabrice Closier, Administrator
Posted: 26 February 2013 10:02 PM   Total Posts: 1265   [ # 1 ]

try set mousepicking to bounds only. Tho, i’m not sure mouse events do work on wireframe (I need check that)

   

aeki, Member
Posted: 27 February 2013 09:30 PM   Total Posts: 73   [ # 2 ]

nope, setting mousepicking to bounds only doesn’t help.

It seems that this feature is not implemented, since it doesn’t work either with the WireFramePrimitive classes of AWAY3D.

Is there a technical reason for not having this feature in Away3D?

   

Avatar
Fabrice Closier, Administrator
Posted: 28 February 2013 10:11 AM   Total Posts: 1265   [ # 3 ]

Traversers use ray to triangle tests. In case of segments, the vertex shader builds a quad per line, but as3 has only access to the start and end vector of the line. not a triangle. I thought the base might be considered as bound.
todo++.
In meanwhile, you could used an alpha 0.01 object acting like as the bound of your object to catch your mouse events…

   

aeki, Member
Posted: 28 February 2013 10:37 PM   Total Posts: 73   [ # 4 ]

So I’m subscribing to this feature!

Thanks for the tip.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X