proper sound orientation(?) and comment out velocity since it messes with OpenAL in such a way that volume doesn't work properly anymore
This commit is contained in:
parent
d2799cd832
commit
7efed53475
2 changed files with 6 additions and 7 deletions
|
@ -304,10 +304,8 @@ FGViewMgr::update (double dt)
|
||||||
smgr->set_position_offset( offs );
|
smgr->set_position_offset( offs );
|
||||||
smgr->set_position_geod( loop_view->getPosition() );
|
smgr->set_position_geod( loop_view->getPosition() );
|
||||||
|
|
||||||
SGQuatd orient = SGQuatd::fromYawPitchRollDeg( loop_view->getHeading_deg(),
|
smgr->set_orientation( loop_view->getViewOrientation(),
|
||||||
loop_view->getPitch_deg(),
|
loop_view->getViewOrientationOffset() );
|
||||||
loop_view->getRoll_deg() );
|
|
||||||
smgr->set_orientation( orient, loop_view->getViewOrientationOffset() );
|
|
||||||
|
|
||||||
// get the model velocity
|
// get the model velocity
|
||||||
SGVec3f velocity = SGVec3f::zeros();
|
SGVec3f velocity = SGVec3f::zeros();
|
||||||
|
|
|
@ -126,21 +126,22 @@ FGAircraftModel::update (double dt)
|
||||||
// update model's audio sample values
|
// update model's audio sample values
|
||||||
_fx->set_position_geod( _aircraft->getPosition() );
|
_fx->set_position_geod( _aircraft->getPosition() );
|
||||||
|
|
||||||
SGQuatd orient = SGQuatd::fromYawPitchRollDeg(-_heading->getDoubleValue(),
|
SGQuatd orient = SGQuatd::fromYawPitchRollDeg(_heading->getDoubleValue(),
|
||||||
_pitch->getDoubleValue(),
|
_pitch->getDoubleValue(),
|
||||||
_roll->getDoubleValue());
|
_roll->getDoubleValue());
|
||||||
_fx->set_orientation( orient );
|
_fx->set_orientation( orient );
|
||||||
|
|
||||||
|
#if 0
|
||||||
SGVec3d vel = SGVec3d( _speed_n->getFloatValue(),
|
SGVec3d vel = SGVec3d( _speed_n->getFloatValue(),
|
||||||
_speed_e->getFloatValue(),
|
_speed_e->getFloatValue(),
|
||||||
_speed_d->getFloatValue() );
|
_speed_d->getFloatValue() );
|
||||||
if ( vel[0] || vel[1] || vel[2] ) {
|
if ( vel[0] || vel[1] || vel[2] ) {
|
||||||
SGQuatd hlOr = SGQuatd::fromLonLat( _aircraft->getPosition() );
|
|
||||||
SGQuatd q(-0.5, -0.5, 0.5, 0.5);
|
SGQuatd q(-0.5, -0.5, 0.5, 0.5);
|
||||||
_velocity = toVec3f( (hlOr*q).backTransform( vel ) );
|
_velocity = toVec3f( q.backTransform( vel ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_velocity = SGVec3f::zeros();
|
_velocity = SGVec3f::zeros();
|
||||||
|
#endif
|
||||||
_fx->set_velocity( _velocity );
|
_fx->set_velocity( _velocity );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue