Hi,
you forget this
try:

Code:

class myKeyboardEventHandler : public osgGA::GUIEventHandler 
   { 
   public: 
      myKeyboardEventHandler(tankInputDeviceStateType* tids) 
:tankInputDeviceState(tids) ;

      { 
      } 
       
      virtual bool handle(const osgGA::GUIEventAdapter& 
ea,osgGA::GUIActionAdapter&); 
      virtual void accept(osgGA::GUIEventHandlerVisitor& v)   { v.visit(*this); 
}; 
   }; 

   bool myKeyboardEventHandler::handle(const osgGA::GUIEventAdapter& 
ea,osgGA::GUIActionAdapter& aa) 
   { 
      switch(ea.getEventType()) 
      { 
      case(osgGA::GUIEventAdapter::KEYDOWN): 
      { 
         switch(ea.getKey()) 
         { 
         case 'w': 
            tankInputDeviceState->moveFwdRequest = true; 
            return false; 
            break; 
         default: 
         return false; 
         } 
      } 
   default: 
   return false; 
      } 
private:
tankInputDeviceStateType * tankInputDeviceState ;
    } 

Cheers

------------------------
 (http://www.hordes.fr?ref=litllechicken)

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=45006#45006





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to