Set the reference time the transform is meant for.
Modified Files: src/AIModel/AICarrier.cxx src/AIModel/AIShip.cxx
This commit is contained in:
parent
c7d3ed68c3
commit
2d1d8120f6
1 changed files with 3 additions and 0 deletions
|
@ -201,6 +201,9 @@ void FGAIShip::update(double dt) {
|
|||
// The cartesian position of the carrier in the wgs84 world
|
||||
SGVec3d cartPos = SGVec3d::fromGeod(pos);
|
||||
|
||||
// The simulation time this transform is meant for
|
||||
aip.setReferenceTime(globals->get_sim_time_sec() + dt);
|
||||
|
||||
// Compute the velocity in m/s in the body frame
|
||||
aip.setBodyLinearVelocity(SGVec3d(0.51444444*speed, 0, 0));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue