Changeset 2766 for code/branches/tutorial/src/orxonox/objects/controllers
- Timestamp:
- Mar 9, 2009, 12:58:08 AM (16 years ago)
- Location:
- code/branches/tutorial/src/orxonox/objects/controllers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutorial/src/orxonox/objects/controllers/DroneController.cc
r2765 r2766 21 21 * 22 22 * Author: 23 * Fabian 'x3n' Landau23 * Oli Scheuss 24 24 * Co-authors: 25 25 * ... … … 42 42 RegisterObject(DroneController); 43 43 44 45 44 46 // this checks that our creator really is a drone 45 47 // and saves the pointer to the drone for the controlling commands … … 56 58 // Place your code here: 57 59 // - steering commands 58 static float totaltime = 0;59 totaltime += dt;60 60 Drone *myDrone = static_cast<Drone*>(this->getControllableEntity()); 61 if(totaltime<1)62 {63 myDrone->moveFrontBack( -sqrt(dt) );64 myDrone->rotatePitch(-dt);65 }61 // you can use the following commands for steering 62 // - moveFrontBack, moveRightLeft, moveUpDown 63 // - rotatePitch, rotateYaw, rotateRoll 64 // - apply the to myDrone (e.g. myDrone->rotateYaw(..) ) 65 66 66 } 67 67 } -
code/branches/tutorial/src/orxonox/objects/controllers/DroneController.h
r2763 r2766 21 21 * 22 22 * Author: 23 * Fabian 'x3n' Landau23 * Oli Scheuss 24 24 * Co-authors: 25 25 * ...
Note: See TracChangeset
for help on using the changeset viewer.