ygCAVENavigator derived from ygNavigator | Example | Source | Header |
Messages |
teleport | three floats | move the user to the absolute position given |
heading | float | orient the user to the absolute rotation given |
speed | float | set the forward and backward navigation speed |
rotspeed | float | set the turning rotational speed |
collide | [bool] | turn on collision detection with objects |
collideRadius | float | set the collision radius around the head |
togglecollide | toggle the collision detection mode | |
fly | [bool] | set the fly mode between walking and flying |
togglefly | toggle the fly mode | |
printnav | print out the current navigator position |
Comments |
constructor ygCAVENavigator
method reset
1 set rotation speed to 45
2 set translation speed to 10
3 set collide to true
4 set collide radius to 1
5 set fly mode to true
method message
1 move the user to the absolute position given
2 orient the user to the absolute rotation given
3 set the forward and backward navigation speed
4 set the turning rotational speed
5 turn on collision detection with objects
6 set the collision radius around the head
7 toggle the collision detection mode
8 set the fly mode between walking and flying
9 toggle the fly mode
10 print out the current navigator position
method teleportTo
method setSpeed
method setRotSpeed
method setCollide
method setFly
method app
0.1 check for CAVE joystick input
0.2 if fly mode is false then adjust height to any ground collision
0.3 if collision detection is on then test for object collisions
method checkJoystick
1 if the CAVE joystick X direction is above threshold
1.1 rotate the navigation heading relative to the joystick value2 if the CAVE joystick Y direction is above threshold
2.1 get the CAVE wand direction
2.2 if fly mode is false then zero the Z component
2.3 translate the navigation position relative to the joystick value
method checkGround
0.1 generate intersection segment down from user head
0.2 if intersection detected then adjust user height to collision position
method checkCollision
method positionOK
method resetCollision