MouseEvent3D.localX return always -1

Software: Away3D 4.x

teckel, Newbie
Posted: 13 October 2011 12:22 PM   Total Posts: 11

Hi there,

I’ve encountered an issue with MouseEvent3D.localX (and Y, Z ). It always return -1.

_playField = new Plane(_playFieldMap,256,64,5,5)
_playField.mouseEnabled true
_playField
.addEventListener(MouseEvent3D.MOUSE_DOWN,downHanlder)

protected function 
downHanlder(e:MouseEvent3D):void{

     trace 
(e.localX,e.localY,e.localZ// OUTPUT ALWAYS -1,-1,-1

I don’t understand why , i’ve seen many tutorial before i ask a stupid question here, but no one mention to this issue.

Thank for help.

   

Arno, Newbie
Posted: 13 October 2011 01:25 PM   Total Posts: 25   [ # 1 ]

Add this line else away3D only register the click and not the x, y and z coordinates.

_playField.mouseDetails true
   

teckel, Newbie
Posted: 13 October 2011 01:51 PM   Total Posts: 11   [ # 2 ]

A bing thank to you,

This method is only 4.x ?

   

teckel, Newbie
Posted: 14 October 2011 09:21 AM   Total Posts: 11   [ # 3 ]

Resolved

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X