Changeset 6487 for code/branches/tutorial/src/orxonox/controllers
- Timestamp:
- Mar 7, 2010, 11:27:20 PM (15 years ago)
- Location:
- code/branches/tutorial
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutorial
- Property svn:mergeinfo changed
/code/branches/tutorial merged: 5841
- Property svn:mergeinfo changed
-
code/branches/tutorial/src/orxonox/controllers/DroneController.cc
r6483 r6487 43 43 // - make sure to register the object in the factory 44 44 // - do any kind of initialisation 45 RegisterObject(DroneController);46 45 47 46 // this checks that our creator really is a drone … … 65 64 // Place your code here: 66 65 // - steering commands 67 static float totaltime = 0;68 totaltime += dt;69 66 Drone *myDrone = static_cast<Drone*>(this->getControllableEntity()); 70 if(totaltime<100)71 {72 myDrone->moveFrontBack( -sqrt(dt) );73 myDrone->rotatePitch(-dt);74 } 67 // you can use the following commands for steering 68 // - moveFrontBack, moveRightLeft, moveUpDown 69 // - rotatePitch, rotateYaw, rotateRoll 70 // - apply the to myDrone (e.g. myDrone->rotateYaw(..) ) 71 75 72 } 76 73 }
Note: See TracChangeset
for help on using the changeset viewer.