Menu

#3 TouchSensor not working properly

open
nobody
None
5
2006-10-19
2006-10-19
Anonymous
No

The TouchSensor fields hitNormal_changed,
hitPoint_changed and hitTexCoord_changed are not
being updated at the correct time.

TouchSensor : X3DTouchSensorNode {
SFString [in,out] description ""
SFBool [in,out] enabled TRUE
SFNode [in,out] metadata NULL
[X3DMetadataObject]
SFVec3f [out] hitNormal_changed
SFVec3f [out] hitPoint_changed
SFVec2f [out] hitTexCoord_changed
SFBool [out] isActive
SFBool [out] isOver
SFTime [out] touchTime
}

According to the spec "Each movement of the pointing
device, while isOver is TRUE, generates
hitPoint_changed, hitNormal_changed and
hitTexCoord_changed events." but this is not
happening on the flux browser. This can be
demonstated using an example from
Floppy's VRML tutorial
http://web3d.vapourtech.com/tutorials/vrml97/worlds/tu
t33a.wrl the small yellow ball should follow the
mouse when the mouse is over the larger red ball.
With the flux browser the small yellow ball only
moves when the user clicks on the larger red ball.

Here is the source code for this example.

#VRML V2.0 utf8

WorldInfo {
title "Floppy's VRML97 Tutorial Example 3.3a"
info ["(C) Copyright 2000 Vapour Technology Ltd."
"guide@vapourtech.com"]
}

Group {
children [
Group {
children [
DEF POSTOUCH TouchSensor {}
Shape {
appearance Appearance {
material Material {
diffuseColor 1 0 0
}
}
geometry Sphere {
radius 3.0
}
}
]
}
DEF SNDTOUCH TouchSensor {}
DEF BALL Transform {
children [
Sound {
minFront 10
minBack 10
maxFront 50
maxBack 50
source DEF SOUND AudioClip {
url "pop.wav"
}
}
Shape {
appearance Appearance {
material Material {
diffuseColor 1 1 0
}
}
geometry Sphere {
radius 0.1
}
}
]
}
]
}
ROUTE SNDTOUCH.touchTime TO SOUND.startTime
ROUTE POSTOUCH.hitPoint_changed TO BALL.translation

Discussion


Log in to post a comment.

MongoDB Logo MongoDB