actionscript 3 - Away3D click listener doesn't work with all the cube, only its center -


i trying add click listener cube in away3d. works... partially. seems click works center of cube's face. have no idea why because should taking bounding box (which, of course, cube). if click somewhere "near" edge of cube, nothing happens.

the code rather simple:

cube = new mesh(new cubegeometry(400, 400, 400, 1, 1, 1, false)); cube.mouseenabled = true; cube.addeventlistener(mouseevent3d.click, cubeclickhandler); var t:trident = new trident(); cube.addchild(t); scene.addchild(cube);  ...  private function cubeclickhandler(event:mouseevent3d):void {     navigatetourl(new urlrequest("http://www.google.com"));  } 

any idea doing wrong , how resolve it? lot!

example here

here suggestions:

  • have tried rotate camera?
  • have tried without trident?(it have big bb , occlude)
  • have tried other picking method?

    cube.pickingcollider = pickingcollidertype.as3_best_hit 
  • it's possible framerate in example (1fps) interfere, try set @ least @ 10fps


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -