Commit the current state of affairs to see if it fixes the position code for others
This commit is contained in:
parent
c56c520ab5
commit
9535c4e339
3 changed files with 9 additions and 10 deletions
|
@ -302,11 +302,10 @@ FGViewMgr::update (double dt)
|
|||
smgr->set_orientation(loop_view->getViewOrientation(),
|
||||
loop_view->getViewOrientationOffset());
|
||||
|
||||
// get the model velocity for the in-cockpit view
|
||||
SGVec3d velocity = SGVec3d(0,0,0);
|
||||
// get the model velocity
|
||||
SGVec3f velocity = SGVec3f::zeros();
|
||||
if ( !stationary() ) {
|
||||
FGAircraftModel *aircraft = globals->get_aircraft_model();
|
||||
velocity = aircraft->getVelocity();
|
||||
velocity = globals->get_aircraft_model()->getVelocity();
|
||||
}
|
||||
smgr->set_velocity(velocity);
|
||||
}
|
||||
|
|
|
@ -131,10 +131,10 @@ FGAircraftModel::update (double dt)
|
|||
_roll->getDoubleValue());
|
||||
_fx->set_orientation( orient );
|
||||
|
||||
SGQuatd q(-0.5, -0.5, 0.5, 0.5);
|
||||
_velocity = q.backTransform( SGVec3d( _speed_n->getDoubleValue(),
|
||||
_speed_e->getDoubleValue(),
|
||||
_speed_d->getDoubleValue()) );
|
||||
SGQuatf q(-0.5, -0.5, 0.5, 0.5);
|
||||
_velocity = q.backTransform( SGVec3f(_speed_n->getFloatValue(),
|
||||
_speed_e->getFloatValue(),
|
||||
_speed_d->getFloatValue()) );
|
||||
_fx->set_velocity( _velocity );
|
||||
}
|
||||
|
||||
|
|
|
@ -39,12 +39,12 @@ public:
|
|||
virtual void unbind ();
|
||||
virtual void update (double dt);
|
||||
virtual SGModelPlacement * get3DModel() { return _aircraft; }
|
||||
virtual SGVec3d getVelocity() { return _velocity; }
|
||||
virtual SGVec3f& getVelocity() { return _velocity; }
|
||||
|
||||
private:
|
||||
|
||||
SGModelPlacement * _aircraft;
|
||||
SGVec3d _velocity;
|
||||
SGVec3f _velocity;
|
||||
SGSharedPtr<FGFX> _fx;
|
||||
|
||||
SGPropertyNode_ptr _lon;
|
||||
|
|
Loading…
Add table
Reference in a new issue