Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 25, 2009, 4:16:38 PM (15 years ago)
Author:
scheusso
Message:

reverted r5766 since we forgot some adjustments to the code (i.e. remove xml hack)

Location:
code/branches/tutorial/src/orxonox/controllers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/tutorial/src/orxonox/controllers

  • code/branches/tutorial/src/orxonox/controllers/DroneController.cc

    r5766 r5786  
    3939        // - make sure to register the object in the factory
    4040        // - do any kind of initialisation
    41        
    42        
     41        RegisterObject(DroneController);
    4342       
    4443        // this checks that our creator really is a drone
     
    5655        // Place your code here:
    5756        // - steering commands
     57        static float totaltime = 0;
     58        totaltime += dt;
    5859        Drone *myDrone = static_cast<Drone*>(this->getControllableEntity());
    59         // you can use the following commands for steering
    60         // - moveFrontBack, moveRightLeft, moveUpDown
    61         // - rotatePitch, rotateYaw, rotateRoll
    62         // - apply the to myDrone (e.g. myDrone->rotateYaw(..) )
    63        
     60        if(totaltime<100)
     61        {
     62            myDrone->moveFrontBack( -sqrt(dt) );
     63            myDrone->rotatePitch(-dt);
     64        }
    6465    }
    6566}
Note: See TracChangeset for help on using the changeset viewer.