Mouseraycast / Entity bounds hit detection

Software: Away3D 4.x

Karim Beyrouti, Administrator
Posted: 16 March 2012 03:46 PM   Total Posts: 30

Reported it on the tracker - and hopefully I am not wasting anyone’s time, as I am not sure whether this is a bug, expected behaviour, or a feature request:

The Mouseraycast looks like it uses the entity bounds to test collision detection, comment in the code for Mouseraycast.as says:

  // sweep renderables and collect entities whose bounds are hit by ray

however it is only using the object to test collision - Is this a bug / or expected behaviour ?

  Sample of possible bug: http://kurst.co.uk/transfer/boundstest/
 
  This shows the object, with showBounds set to true.
  Code: http://kurst.co.uk/transfer/boundstest/BoundsHitTest.as
 
While the current system is more precise and great for a lot of cases, could we add an option to use object bounds for mouse hit detection if this is expected behaviour ?

   

Karim Beyrouti, Administrator
Posted: 27 March 2012 05:35 PM   Total Posts: 30   [ # 1 ]

Please ignore - found the solution, for the archives there is a ‘mouseHitMethod’ on the mesh object :

amesh.mouseHitMethod = MouseHitMethod.BOUNDS_ONLY;

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X