mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 10:07:58 +02:00
cleanup
This commit is contained in:
parent
556dcd69ac
commit
fd01258c76
1 changed files with 4 additions and 4 deletions
|
@ -1555,11 +1555,11 @@ void MyAvatar::harvestResultsFromPhysicsSimulation(float deltaTime) {
|
||||||
|
|
||||||
if (_characterController.isEnabledAndReady()) {
|
if (_characterController.isEnabledAndReady()) {
|
||||||
setVelocity(_characterController.getLinearVelocity() + _characterController.getFollowVelocity());
|
setVelocity(_characterController.getLinearVelocity() + _characterController.getFollowVelocity());
|
||||||
/*FIXME if (_characterController.isStuck()) {
|
if (_characterController.isStuck()) {
|
||||||
_physicsSafetyPending = true;
|
_physicsSafetyPending = true;
|
||||||
_goToPosition = getPosition();
|
_goToPosition = getPosition();
|
||||||
qDebug() << "FIXME setting safety test at:" << _goToPosition;
|
qDebug() << "FIXME setting safety test at:" << _goToPosition;
|
||||||
}*/
|
}
|
||||||
} else {
|
} else {
|
||||||
setVelocity(getVelocity() + _characterController.getFollowVelocity());
|
setVelocity(getVelocity() + _characterController.getFollowVelocity());
|
||||||
}
|
}
|
||||||
|
@ -2258,12 +2258,12 @@ bool MyAvatar::safeLanding(const glm::vec3& position) {
|
||||||
}
|
}
|
||||||
qDebug() << "rechecking" << position << " => " << better << " collisions:" << getCollisionsEnabled() << " physics:" << qApp->isPhysicsEnabled();
|
qDebug() << "rechecking" << position << " => " << better << " collisions:" << getCollisionsEnabled() << " physics:" << qApp->isPhysicsEnabled();
|
||||||
if (!getCollisionsEnabled()) {
|
if (!getCollisionsEnabled()) {
|
||||||
goToLocation(better); // recurses
|
goToLocation(better); // recurses on next update
|
||||||
} else { // If you try to go while stuck, physics will keep you stuck.
|
} else { // If you try to go while stuck, physics will keep you stuck.
|
||||||
setCollisionsEnabled(false);
|
setCollisionsEnabled(false);
|
||||||
// Don't goToLocation just yet. Yield so that physics can act on the above.
|
// Don't goToLocation just yet. Yield so that physics can act on the above.
|
||||||
QMetaObject::invokeMethod(this, "goToLocationAndEnableCollisions", Qt::QueuedConnection, // The equivalent of javascript nextTick
|
QMetaObject::invokeMethod(this, "goToLocationAndEnableCollisions", Qt::QueuedConnection, // The equivalent of javascript nextTick
|
||||||
Q_ARG(glm::vec3, better)); // I.e., capsuleCenter - offset
|
Q_ARG(glm::vec3, better));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue