From d2466d605f1ded432eb8e6490155aa7e289ecd80 Mon Sep 17 00:00:00 2001 From: frohlich Date: Thu, 5 Mar 2009 06:07:08 +0000 Subject: [PATCH] Set the motion transform id in the collection step. Modified Files: src/FDM/groundcache.cxx --- src/FDM/groundcache.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/FDM/groundcache.cxx b/src/FDM/groundcache.cxx index 6818577f0..9932aa681 100644 --- a/src/FDM/groundcache.cxx +++ b/src/FDM/groundcache.cxx @@ -143,11 +143,7 @@ public: // Look for a velocity note const SGSceneUserData::Velocity* velocity = getVelocity(transform); - // ... no velocity of there is only zero velocity - if (velocity && velocity->linear == SGVec3d::zeros() && - velocity->angular == SGVec3d::zeros()) - velocity = 0; - + SGVec3d center = _center; _center = SGVec3d(inverseMatrix.preMult(_center.osg())); double radius = _radius; @@ -169,6 +165,7 @@ public: bvhTransform->setAngularVelocity(velocity->angular); bvhTransform->setReferenceTime(_startTime); bvhTransform->setEndTime(_endTime); + bvhTransform->setId(velocity->id); mSubTreeCollector.popNodeList(parentNodeList, bvhTransform); } else {