[X3D-Public] What is the behavior of Touch/Drag sensors when occluded?
michalis.kambi at gmail.com
Sat May 12 02:01:11 PDT 2012
Dave A wrote:
> Let's say you have an object that has a TouchSensor on it. It happens to
> be behind a (let's say) semi-transparent object. Maybe that material has
> a texture that looks like chain-link fence or maybe it's a window.
I can't speak about Contact here, but I know what X3D spec says and what
X3D specification explicitly says is in component "20 Pointing device
sensor component" that
"The appearance properties of the geometry do not affect activation of
the sensor. In particular, transparent materials or textures shall be
treated as opaque with respect to activation of pointing device sensors."
So you can't pick through transparent materials or textures (with holes
(alpha test) or transparency (alpha blending)).
This may be uncomfortable for scene creation sometimes, but really it's
a great rule for implementing browsers, otherwise a lot of complicated
work would be required in some cases for collision detection. In other
words, the X3D specification did it right, in my opinion. If you want to
have a shape with holes, you will have to model these holes by geometry.
> So ultimately, what I expect, is some sort of boolean or node or
> something that says 'ignore for picking' or something to that effect.
There is a Collision node that allows to disable given object for the
purposes of all collision detection (collision with avatar as well as
picking --- at least that's how I implemented it in view3dscene).
Hope this helps,
More information about the X3D-Public