object behind other object not clickable

Software: Away3D 4.x

Qbrain, Member
Posted: 25 December 2011 02:57 PM   Total Posts: 92

Hey There!

For my project, I have several objects which are clickable. I would like to know what is the easiest way to check if an object is behind another object from the camera viewpoint. (so i can temporarily disable the mouseup eventlistener).

In this image, the red object with the blue outline is the object behind a wall. the green boxes are 2 examples of camera viewpoints, one sees the wall, and the other sees the object. My question is basicly how I can check if the red/blue object is behind the wall (so, not directly visible) and when it is directly visible.

At the moment, people can still click the red/blue object, even if it is behind the wall.

I would love to see a dynamic solution to this, so not just say “if camera.x < blabla add the eventlistener”

Sorry, 3D in this way is kind of new for me wink

-Q

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X