public function CameraControlerGame(v:View3D , s:Stage,d:Elevation)
{
_view = v
_camera = _view.camera
_camera.lens =_lens
_camera.lens.near = 0.1
_terrianElevation = d;
_cameraControler = new HoverController(_camera , _cameraTarget,0,30,30,20,89)
_cameraControler.steps = 2;
_stage = s
_terrianElevation.addEventListener(MouseEvent3D.MOUSE_OVER, onMouse3dClick)
_stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseButtonDown )
_stage.addEventListener(MouseEvent.MOUSE_UP, onMouseButtonUp )
_stage.addEventListener(MouseEvent.MOUSE_WHEEL , onMouseScroll)
_stage.addEventListener(KeyboardEvent.KEY_DOWN , onKDown)
_stage.addEventListener(KeyboardEvent.KEY_UP , onKUp)
}
public function onMouse3dClick(e:MouseEvent3D):void
{
trace(e.target.x)
}
Hi MouseEvent3D doesn’t work here. What is wrong with it. I tried everything but it doesn’t trigger the event at all. I’m trying to get the coordinates of an Elevation when mouse click.Thanks in advance . Chears