Changeset 3981 in orxonox.OLD for orxonox/trunk/src/util/animation/animation3d.cc
- Timestamp:
- Apr 26, 2005, 3:16:28 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/animation/animation3d.cc
r3980 r3981 117 117 118 118 tmpKeyFrame->position = position; 119 //tmpKeyFrame->lastPosition = position; 119 120 tmpKeyFrame->direction = direction; 120 121 tmpKeyFrame->duration = duration; … … 170 171 case ANIM_LINEAR: 171 172 this->animFuncMov = &Animation3D::mLinear; 173 this->object->setRelCoor(this->currentKeyFrame->position); 174 this->currentKeyFrame->lastPosition = Vector(); 172 175 break; 173 176 case ANIM_SINE: … … 219 222 void Animation3D::mLinear(float timePassed) const 220 223 { 221 this->object->setRelCoor(this->currentKeyFrame->position +222 (this->nextKeyFrame->position - this->currentKeyFrame->position) * 223 (timePassed/this->currentKeyFrame->duration));224 Vector v = (this->nextKeyFrame->position - this->currentKeyFrame->position) * (timePassed/this->currentKeyFrame->duration); 225 this->object->shiftCoor(v - this->currentKeyFrame->lastPosition); 226 this->currentKeyFrame->lastPosition = v; 224 227 } 225 228
Note: See TracChangeset
for help on using the changeset viewer.