[x3d-public] passive vs. active mouse isOver event

Don Brutzman brutzman at nps.edu
Mon Nov 7 09:09:06 PST 2016


On 11/5/2016 2:46 PM, Andreas Plesch wrote:
> I noticed that cobweb does not generate an isOver TouchSensor event when the pointing device is not moved actively but the sensed geometry itself moves under the mouse pointer. At first this was surprising to me but after reading
>
> http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/pointingsensor.html#TouchSensor
>
> this seems to be the expected behaviour since active mouse movement is required to generate events.

======================================================
The isOver field reflects the state of the pointing device with regard to whether it is pointing towards the TouchSensor node's geometry or not. When the pointing device changes state from a position such that its bearing does not intersect any of the TouchSensor node's geometry to one in which it does intersect geometry, an isOver TRUE event is generated. When the pointing device moves from a position such that its bearing intersects geometry to one in which it no longer intersects the geometry, or some other geometry is obstructing the TouchSensor node's geometry, an isOver FALSE event is generated. These events are generated only when the pointing device has moved and changed `over' state. Events are not generated if the geometry itself is animating and moving underneath the pointing device.
======================================================

> Do other browser behave the same way ?

yes good question, glad people are checking...

I wondered if we should add a boolean field for this, but it seems clear that user interaction is an intended prerequisite for TouchSensor activity (i.e. "touching").   If an author wants something to occur when geometry becomes visible, they can use VisibilitySensor instead.

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list