Changeset 10733 in orxonox.OLD for branches/presentation
- Timestamp:
- Jun 20, 2007, 2:41:51 PM (17 years ago)
- Location:
- branches/presentation/src/world_entities/weapons
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/weapons/disruptor.cc
r10728 r10733 125 125 126 126 127 this->shootAnim[0][0]->addKeyFrame(Vector(0.0, 0.0, 0.0) * this->getScaling(), Quaternion(), 0. 0333, ANIM_LINEAR, ANIM_NULL);127 this->shootAnim[0][0]->addKeyFrame(Vector(0.0, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.1, ANIM_LINEAR, ANIM_NULL); 128 128 this->shootAnim[0][0]->addKeyFrame(Vector(-0.5, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.2, ANIM_LINEAR, ANIM_NULL); 129 this->shootAnim[0][0]->addKeyFrame(Vector(0.0, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.1, ANIM_LINEAR, ANIM_NULL);129 // this->shootAnim[0][0]->addKeyFrame(Vector(0.0, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.1, ANIM_LINEAR, ANIM_NULL); 130 130 131 131 Animation3D* animation2 = this->getAnimation(WS_ACTIVATING, this); -
branches/presentation/src/world_entities/weapons/nadion_laser.cc
r10728 r10733 142 142 pj->setParent(PNode::getNullParent()); 143 143 144 Vector tmp = this->getDefaultTarget()->getAbsCoor() - this->getAbsCoor(); 144 Vector dir = (this->getDefaultTarget()->getAbsCoor() - this->getAbsCoor()).getNormalized(); 145 // HACK direction AbsDir calulation 146 Vector up = dir.cross(VECTOR_RAND(1)); 145 147 146 pj->setVelocity(this->getParent()->getVelocity() + (tmp.getNormalized())*160); 148 //force a resoable up vector 149 while (up.len() < .0001) 150 up = dir.cross(VECTOR_RAND(1)); 151 152 pj->setVelocity(this->getParent()->getVelocity() + (dir)*160); 147 153 148 154 pj->setAbsCoor(this->getEmissionPoint()); 149 155 // pj->setAbsDir(Quaternion(this->getDefaultTarget()->getAbsCoor() - this->getAbsCoor(), Vector(0,0,0))); 150 156 // pj->setAbsDir(Quaternion(tmp.getNormalized(), this->getParent()->getAbsDir().apply(Vector(0,1,0)))); 151 157 pj->setAbsDir(Quaternion(dir, up.getNormalized())); 158 152 159 pj->setAbsDir(this->getAbsDir()); 153 160 pj->activate();
Note: See TracChangeset
for help on using the changeset viewer.