don't forget to add detailedMotionStates to simulation

This commit is contained in:
Andrew Meadows 2019-05-02 13:24:25 -07:00
parent a0841c937c
commit af1f4364ef

View file

@ -295,7 +295,7 @@ void AvatarManager::updateOtherAvatars(float deltaTime) {
render::Transaction renderTransaction;
workload::Transaction workloadTransaction;
for (int p = kHero; p < NumVariants; p++) {
auto& priorityQueue = avatarPriorityQueues[p];
// Sorting the current queue HERE as part of the measured timing.
@ -471,13 +471,17 @@ void AvatarManager::rebuildAvatarPhysics(PhysicsEngine::Transaction& transaction
OtherAvatar::BodyLOD lod = avatar->getBodyLOD();
if (lod == OtherAvatar::BodyLOD::Sphere) {
auto dMotionState = createDetailedMotionState(avatar, -1);
detailedMotionStates.push_back(dMotionState);
if (dMotionState) {
detailedMotionStates.push_back(dMotionState);
transaction.objectsToAdd.push_back(dMotionState);
}
} else {
int32_t numJoints = avatar->getJointCount();
for (int32_t i = 0; i < numJoints; i++) {
auto dMotionState = createDetailedMotionState(avatar, i);
if (dMotionState) {
detailedMotionStates.push_back(dMotionState);
transaction.objectsToAdd.push_back(dMotionState);
}
}
}