HELP needed with Proximity Sensor 
Author Message
 HELP needed with Proximity Sensor

Greetings,

I'm having a problem with a Proximity Sensor.  Specifically, I have one
linked to a door which opens when an avatar gets close to it, but cannot
figure out how to get the door to close when the avatar backs away or passes
through the "zone of influence".

Can anyone help?


Jamie



Sun, 05 May 2002 03:00:00 GMT  
 HELP needed with Proximity Sensor

I'll guess that you're using the isActive event to open the door...

You could use the enterTime to open and exitTime to close.

If the exitTime is sent while the door is still
opening, the door won't close, assuming
you're using clocks & interpolators.

Quote:

> Greetings,

> I'm having a problem with a Proximity Sensor.  Specifically, I have one
> linked to a door which opens when an avatar gets close to it, but cannot
> figure out how to get the door to close when the avatar backs away or passes
> through the "zone of influence".

> Can anyone help?


> Jamie

--
Shane
_______________________________________________
http://www.internet3d.net
Geometrek vrml solutions - http://geometrek.com


Sun, 05 May 2002 03:00:00 GMT  
 HELP needed with Proximity Sensor
This may not be the best way, but here's how I did it:

#door

DEF doorTrans Transform {
 translation 8 0 8
 children [
  USE door

  DEF doorOpen OrientationInterpolator {
   key [ 0 1 ]
   keyValue [
   0 1 0 0
   0 1 0 -1.57
   ]
  }

  DEF doorClose OrientationInterpolator {
   key [ 0 1 ]
   keyValue [
   0 1 0 -1.57
   0 1 0 0
   ]
  }
 ]

Quote:
}

DEF openTimer TimeSensor {
 cycleInterval 3

Quote:
}

DEF closeTimer TimeSensor {
 cycleInterval 3

Quote:
}

DEF idoorProxSens ProximitySensor {
 center 8 1 8
 size 8 2 8
 enabled TRUE

Quote:
}

# open
ROUTE doorProxSens.enterTime TO openTimer.startTime
ROUTE openTimer.fraction_changed TO doorOpen.set_fraction
ROUTE doorOpen.value_changed TO doorTrans.set_rotation

#close
ROUTE doorProxSens.exitTime TO closeTimer.startTime
ROUTE closeTimer.fraction_changed TO doorClose.set_fraction
ROUTE doorClose.value_changed TO doorTrans.set_rotation



Mon, 06 May 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. proximity sensor triggering a touch sensor

2. proximity sensor : urgent help

3. Proximity Sensors

4. Proximity Sensors

5. Proximity Sensors

6. anchor with proximity sensor

7. Proximity sensor

8. Starting/stopping animations with proximity sensor

9. Viewpoint jumps & proximity sensors in CosmoPlayer

10. EAI.. Proximity Sensor

11. Proximity Sensor

12. nested proximity sensor

 

 
Powered by phpBB® Forum Software