Table of Contents Chapter Index Previous Slide Next Slide 157
Syntax: PlaneSensor

Sensing viewer actions
Syntax: PlaneSensor
  • A PlaneSensor node senses a cursor drag and generates translations as if sliding on a plane
  • isActive - sends true/false when mouse button pressed/released
  • translation_changed - sends translations during a drag
  • Transform {
        children [
            DEF MoveMe Transform { . . . }
            DEF Mover  PlaneSensor { }
        ]
    }
    ROUTE Mover.translation_changed
       TO MoveMe.set_translation