mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:24:03 +02:00
zero velocities when we clear simulatorID
This commit is contained in:
parent
89ec3c21b4
commit
6deedd19a3
1 changed files with 4 additions and 1 deletions
|
@ -32,9 +32,12 @@ void SimpleEntitySimulation::updateEntitiesInternal(const quint64& now) {
|
|||
SharedNodePointer ownerNode = nodeList->nodeWithUUID(entity->getSimulatorID());
|
||||
if (ownerNode.isNull() || !ownerNode->isAlive()) {
|
||||
qCDebug(entities) << "auto-removing simulation owner" << entity->getSimulatorID();
|
||||
// TODO: zero velocities when we clear simulatorID?
|
||||
|
||||
entity->setSimulatorID(QUuid());
|
||||
itemItr = _hasSimulationOwnerEntities.erase(itemItr);
|
||||
|
||||
// zero the velocity on this entity so that it doesn't drift far away
|
||||
entity->setVelocity(glm::vec3(0.0f));
|
||||
} else {
|
||||
++itemItr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue