- Timestamp:
- Nov 20, 2017, 2:15:02 PM (7 years ago)
- Location:
- code/branches/SOBv2_HS17
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/SOBv2_HS17/data/levels/SOB.oxw
r11556 r11567 103 103 104 104 105 <SOBFireball collisionType="dynamic" speed=40 position = " 20,0,100">105 <SOBFireball collisionType="dynamic" speed=40 position = "10,0,40"> 106 106 <attached> 107 107 <Model mesh="planets/sol.mesh" position="0,0,1" scale=3 pitch=90/> -
code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc
r11556 r11567 267 267 //If player hits space and collides against an object under him then jump 268 268 if (inputAllowed && firePressed_ && isColliding_ && (collDisZ_ >= 0 && collDisZ_ <+ 10)) { 269 //if (inputAllowed && firePressed_ && isColliding_ ) {270 271 269 gravityAcceleration_ = 100.0; 272 270 velocity.z = 110; -
code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFireball.cc
r11556 r11567 1 /*1 /* 2 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 3 * > www.orxonox.net < … … 57 57 figure_ = nullptr; 58 58 this->enableCollisionCallback(); 59 gravityAcceleration_ = 3.0;59 gravityAcceleration_ = 5.0; 60 60 speed_ = 0; 61 61 hasCollided_=false; … … 104 104 changeAllowed_ = false; 105 105 Vector3 velocity = getVelocity(); 106 orxout() << "before: velocity in z = " << velocity.z << endl; 106 107 velocity.z = -velocity.z; 108 orxout() << "after: velocity in z = " << velocity.z << endl; 109 107 110 setVelocity(velocity); 108 111 } … … 111 114 else if(changeAllowed_ && (abs(collDisX_)>abs(collDisZ_))) 112 115 { 116 orxout() << "collision with the vertical side of a block " << endl; 117 113 118 changeAllowed_ = false; 114 119 goesRight_=!goesRight_; … … 134 139 changedOn_+= dt; 135 140 // After a collision, we don't listen for collisions for 200ms - that's because one wall can cause several collisions! 136 if (changedOn_> 0. 200) {141 if (changedOn_> 0.100) { 137 142 changeAllowed_ = true; 138 143 changedOn_ = 0.0; 139 144 140 145 } 146 141 147 } 148 int dir = 1; 149 if (!goesRight_) 150 dir = -1; 151 152 Vector3 velocity = getVelocity(); 153 velocity.z -= gravityAcceleration_*dt; 154 velocity.x = dir*speed_; 155 setVelocity(velocity); 156 157 lastPos_ = getPosition(); 142 158 143 144 int dir = 1;145 if (!goesRight_)146 dir = -1;147 148 Vector3 velocity = getVelocity();149 velocity.z -= gravityAcceleration_*dt;150 velocity.x = dir*speed_;151 setVelocity(velocity);152 153 lastPos_ = getPosition();154 159 } 160 155 161 156 162 -
code/branches/SOBv2_HS17/src/modules/superorxobros/SOBGumba.cc
r11416 r11567 106 106 } 107 107 } 108 108 109 109 110 110 int dir = 1; … … 118 118 119 119 lastPos_ = getPosition(); 120 120 121 } 121 122 123 122 }
Note: See TracChangeset
for help on using the changeset viewer.