- Timestamp:
- Apr 17, 2014, 2:24:12 PM (11 years ago)
- Location:
- code/branches/ScriptableController/src/orxonox/controllers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ScriptableController/src/orxonox/controllers/ScriptController.cc
r10028 r10034 30 30 #include "core/CoreIncludes.h" 31 31 #include "worldentities/ControllableEntity.h" 32 #include <cmath> 32 33 33 34 namespace orxonox … … 58 59 } 59 60 60 void ScriptController::moveToPosition(const Vector3& target)61 const Vector3& ScriptController::getPosition() 61 62 { 62 63 /*this->controlled_->rotateYaw(-sgn(coord.x)*coord.x*coord.x); 64 this->controlled_->rotatePitch(sgn(coord.y)*coord.y*coord.y);*/ 63 return this->controlled->getPosition(); 65 64 } 65 66 void ScriptController::moveToPosition_beta(float x, float y, float z ) 67 { 68 69 /*const Vector3 local=getPosition(); 70 const Vector3* target=new Vector3(x,y,z); 71 72 setDirection(target, TransformSpace relativeTo = WorldEntity::Local, local); 73 74 float dist = (target - local).length(); 75 76 moveFrontBack(dist);*/ 77 78 orxout()<<x<<" "<<y<<" "<<z<<endl; 79 80 81 82 //this->controlled->rotateYaw(-sgn(coord.x)*coord.x*coord.x); erkennt coord nicht 83 //this->controlled->rotatePitch(sgn(coord.y)*coord.y*coord.y); 84 } 85 86 /* TO DO; noetige bewegungsfunktionen mit geschw., verbleibzeit.. als parameter*/ 66 87 67 88 /*void WaypointController::tick(float dt) //copied from waypointcontroller -
code/branches/ScriptableController/src/orxonox/controllers/ScriptController.h
r10028 r10034 56 56 // LUA interface 57 57 // tolua_begin 58 void moveToPosition (const Vector3& target);58 void moveToPosition_beta(float x, float y, float z); 59 59 60 60 61 61 const Vector3& getPosition(); 62 62 63 63 /* virtual void tick(float dt);*/
Note: See TracChangeset
for help on using the changeset viewer.