[Orxonox-commit 4422] r9093 - code/branches/waypoints/src/orxonox/controllers

scmoritz at orxonox.net scmoritz at orxonox.net
Fri Apr 20 13:11:30 CEST 2012


Author: scmoritz
Date: 2012-04-20 13:11:30 +0200 (Fri, 20 Apr 2012)
New Revision: 9093

Modified:
   code/branches/waypoints/src/orxonox/controllers/FormationController.cc
Log:
Movement to Waypoint fixed. Speed still has to get adjusted

Modified: code/branches/waypoints/src/orxonox/controllers/FormationController.cc
===================================================================
--- code/branches/waypoints/src/orxonox/controllers/FormationController.cc	2012-04-17 21:51:21 UTC (rev 9092)
+++ code/branches/waypoints/src/orxonox/controllers/FormationController.cc	2012-04-20 11:11:30 UTC (rev 9093)
@@ -276,8 +276,8 @@
 		if(coord.x < 0.0001 && coord.y < 0.0001)
 		{
 			// I AM HERE
-			Vector3 v_temp = this->getControllableEntity()->getPosition() * target;
-			Quaternion quat = v_temp.getRotationTo(target);
+			Vector3 v_temp = this->getControllableEntity()->getOrientation();
+			Quaternion quat = v_temp.getRotationTo(target) * v_temp;
 			this->getControllableEntity()->rotate(quat);
 			
 			//this->getControllableEntity()->setOrientation(this->getControllableEntity()->getPosition().getRotationTo(target) * this->getControllableEntity()->getOrientation());




More information about the Orxonox-commit mailing list