mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 12:18:36 +02:00
don't forget to add detailedMotionStates to simulation
This commit is contained in:
parent
a0841c937c
commit
af1f4364ef
1 changed files with 6 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue