168

Sensing viewer actions
Syntax: SphereSensor

  • A SphereSensor node senses a cursor drag and generates rotations as if rotating a ball
  • isActive - sends true/false when mouse button pressed/released
  • rotation_changed - sends rotation during a drag
  • Transform {
        children [
            DEF Rotator  SphereSensor { }
            DEF RotateMe Transform { . . . }
        ]
    }
    ROUTE Rotator.rotation_changed TO RotateMe.set_rotation