add relative pos back in

This commit is contained in:
ehofman 2009-10-30 12:59:53 +00:00 committed by Tim Moore
parent 145a7fa146
commit bcb95f647d

View File

@ -207,7 +207,12 @@ void SGSoundSample::update_absolute_position() {
// The cartesian position of the base sound coordinate // The cartesian position of the base sound coordinate
SGVec3d position = SGVec3d::fromGeod(_base_pos); SGVec3d position = SGVec3d::fromGeod(_base_pos);
_absolute_pos = position; // + (sc2body*q).backTransform(_relative_pos); _absolute_pos = position;
if ( !(_relative_pos[0] == 0 && _relative_pos[1] == 0 &&
_relative_pos[2] == 0) )
{
_absolute_pos += (sc2body*q).backTransform(_relative_pos);
}
if ( !(_direction[0] == 0 && _direction[1] == 0 && _direction[2] == 0) ) { if ( !(_direction[0] == 0 && _direction[1] == 0 && _direction[2] == 0) ) {
_orivec = toVec3f((sc2body*q).backTransform(toVec3d(_direction))); _orivec = toVec3f((sc2body*q).backTransform(toVec3d(_direction)));
} }