[Orxonox-commit 6948] r11569 - in code/branches/SOBv2_HS17: data/levels src/modules/superorxobros

varxth at orxonox.net varxth at orxonox.net
Mon Nov 20 14:28:37 CET 2017


Author: varxth
Date: 2017-11-20 14:28:36 +0100 (Mon, 20 Nov 2017)
New Revision: 11569

Modified:
   code/branches/SOBv2_HS17/data/levels/SOB.oxw
   code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFireball.cc
Log:
better Fireball

Modified: code/branches/SOBv2_HS17/data/levels/SOB.oxw
===================================================================
--- code/branches/SOBv2_HS17/data/levels/SOB.oxw	2017-11-20 13:16:00 UTC (rev 11568)
+++ code/branches/SOBv2_HS17/data/levels/SOB.oxw	2017-11-20 13:28:36 UTC (rev 11569)
@@ -102,13 +102,13 @@
 
 
 
-					<SOBFireball collisionType="dynamic" speed=40 position = "10,0,40">
+					<SOBFireball collisionType="dynamic" speed=80 position = "10,0,40">
 						<attached>
-							<Model mesh="planets/sol.mesh" position="0,0,1" scale=3 pitch=90/> 
+							<Model mesh="planets/sol.mesh" position="0,0,0" scale=3 pitch=90/> 
 							
 						</attached>
 						<collisionShapes>
-							<BoxCollisionShape position="0,0,0" halfExtents="5,5,5" /> 			
+							<SphereCollisionShape position="0,0,0" halfExtents="5,5,5" /> 			
 						</collisionShapes>
 					</SOBFireball>
 

Modified: code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFireball.cc
===================================================================
--- code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFireball.cc	2017-11-20 13:16:00 UTC (rev 11568)
+++ code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFireball.cc	2017-11-20 13:28:36 UTC (rev 11569)
@@ -56,7 +56,7 @@
         setAngularFactor(0.0);
         figure_ = nullptr;
         this->enableCollisionCallback();
-        gravityAcceleration_ = 5.0;
+        gravityAcceleration_ = 350.0;
         speed_ = 0;
         hasCollided_=false;
         lastPos_ = getPosition();
@@ -66,6 +66,7 @@
         goesRight_ = true;
         collDisX_ = 0;
         collDisZ_ = 0;
+        hitCounter_ = 0;
 
       orxout() << "fireball existed" << endl;
 
@@ -119,6 +120,8 @@
             goesRight_=!goesRight_;
         }
 
+        hitCounter_++;
+
         
         return true;
     }
@@ -152,6 +155,7 @@
             Vector3 velocity = getVelocity();
             velocity.z -= gravityAcceleration_*dt;
             velocity.x = dir*speed_;
+            velocity.y = 0;
             setVelocity(velocity);
 
             lastPos_ = getPosition();



More information about the Orxonox-commit mailing list