Changeset 5786 for code/branches/tutorial/src/orxonox/controllers
- Timestamp:
- Sep 25, 2009, 4:16:38 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/libraries2/src/orxonox/controllers reverse-merged: 5734-5735 /code/branches/tutorial/src/orxonox/objects/controllers reverse-merged: 2766-2767
- Property svn:mergeinfo changed
-
code/branches/tutorial/src/orxonox/controllers/DroneController.cc
r5766 r5786 39 39 // - make sure to register the object in the factory 40 40 // - do any kind of initialisation 41 42 41 RegisterObject(DroneController); 43 42 44 43 // this checks that our creator really is a drone … … 56 55 // Place your code here: 57 56 // - steering commands 57 static float totaltime = 0; 58 totaltime += dt; 58 59 Drone *myDrone = static_cast<Drone*>(this->getControllableEntity()); 59 // you can use the following commands for steering60 // - moveFrontBack, moveRightLeft, moveUpDown61 // - rotatePitch, rotateYaw, rotateRoll62 // - apply the to myDrone (e.g. myDrone->rotateYaw(..) )63 60 if(totaltime<100) 61 { 62 myDrone->moveFrontBack( -sqrt(dt) ); 63 myDrone->rotatePitch(-dt); 64 } 64 65 } 65 66 }
Note: See TracChangeset
for help on using the changeset viewer.