- Timestamp:
- Sep 23, 2009, 4:57:45 PM (15 years ago)
- Location:
- code/branches/tutorial/src/orxonox/controllers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutorial/src/orxonox/controllers
- Property svn:mergeinfo changed
/code/branches/tutorial/src/orxonox/objects/controllers merged: 2766-2767
- Property svn:mergeinfo changed
-
code/branches/tutorial/src/orxonox/controllers/DroneController.cc
r5765 r5766 21 21 * 22 22 * Author: 23 * Fabian 'x3n' Landau23 * Oli Scheuss 24 24 * Co-authors: 25 25 * ... … … 39 39 // - make sure to register the object in the factory 40 40 // - do any kind of initialisation 41 RegisterObject(DroneController); 41 42 42 43 43 44 // this checks that our creator really is a drone … … 55 56 // Place your code here: 56 57 // - steering commands 57 static float totaltime = 0;58 totaltime += dt;59 58 Drone *myDrone = static_cast<Drone*>(this->getControllableEntity()); 60 if(totaltime<100)61 {62 myDrone->moveFrontBack( -sqrt(dt) );63 myDrone->rotatePitch(-dt);64 }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 65 64 } 66 65 }
Note: See TracChangeset
for help on using the changeset viewer.