I'm currently working on an ElevationGrid Editor in VRML.
First, I connected a PlaneSensor to every ElevationGrid point,
which very quickly (with a greater number of points in that
grid ) leaded to performance problems.
After that, I used a single TouchSensor with the ElevationGrid
to get the hitPoint in order control my 'Cursor'.
So far everything's fine.
Now if the TouchSensor sends an isActive TRUE event to my Script,
it should
1. disable the TouchSensor
2. enable a PlaneSensor which is also 'connected' to the EGrid.
Now the translation of the PlaneSensor should be used to control
the current point's height.
My problem (with Cosmo/Mac):
The enabled PlaneSensor obviously don't send translation_changed events
until I release the mouse.
function touchSensorActive(value,ts){
// if TouchSensor goes active, disable it and enable PlaneSensor
if(value){
planeSensor_enabled = true;
touchSensor_enabled = false;
}
}
It would be nice if there'd be a seamless transition between moving the
Cursor over the grid till you've reached the point you like to alter and
then enable the PlaneSensor and control the height.
Roland
Roland Praehofer - webdesign.sound.virtual_environments
web: http://www.*-*-*.com/
tel: +49 30 827 029 77
mobile:+49 173 619 20 85
fax :+49 30 827 029 78