thread safety

This commit is contained in:
howard-stearns 2017-05-26 15:31:59 -07:00
parent cd3865e420
commit 4be31f1b18

View file

@ -2233,6 +2233,11 @@ bool MyAvatar::safeLanding(const glm::vec3& position) {
// (which may be that same "nearest above intersection"). That highest intersection is the candidate landing point.
// For b, use that top surface point.
// We then place our feet there, recurse with new capsule center point, and return true;
if (QThread::currentThread() != thread()) {
bool result;
QMetaObject::invokeMethod(this, "safeLanding", Qt::BlockingQueuedConnection, Q_RETURN_ARG(bool, result), Q_ARG(const glm::vec3&, position));
return result;
}
const auto offset = _characterController.getCapsuleLocalOffset();
const auto capsuleCenter = position + offset;