[Orxonox-commit 2233] r6949 - code/branches/rocket/src/modules/weapons/projectiles
scheusso at orxonox.net
scheusso at orxonox.net
Fri May 21 09:36:01 CEST 2010
Author: scheusso
Date: 2010-05-21 09:36:01 +0200 (Fri, 21 May 2010)
New Revision: 6949
Modified:
code/branches/rocket/src/modules/weapons/projectiles/SimpleRocket.cc
Log:
this should fix the steering function of the SimpleRocket
changed size of the collision shape to be more realistic, still not good though
Modified: code/branches/rocket/src/modules/weapons/projectiles/SimpleRocket.cc
===================================================================
--- code/branches/rocket/src/modules/weapons/projectiles/SimpleRocket.cc 2010-05-21 07:33:13 UTC (rev 6948)
+++ code/branches/rocket/src/modules/weapons/projectiles/SimpleRocket.cc 2010-05-21 07:36:01 UTC (rev 6949)
@@ -80,9 +80,10 @@
this->setCollisionResponse(false);
this->setCollisionType(Kinematic);
+ // TODO: fix the orientation and size of this collision shape to match the rocket
ConeCollisionShape* collisionShape = new ConeCollisionShape(this);
collisionShape->setRadius(3);
- collisionShape->setHeight(500);
+ collisionShape->setHeight(5);
this->attachCollisionShape(collisionShape);
this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&SimpleRocket::destroyObject, this)));
@@ -95,6 +96,7 @@
this->setAngularVelocity(this->getOrientation() * this->localAngularVelocity_);
this->setVelocity( this->getOrientation()*WorldEntity::FRONT*this->getVelocity().length() );
+ this->localAngularVelocity_ = 0;
if( this->bDestroy_ )
this->destroy();
More information about the Orxonox-commit
mailing list