mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 09:04:33 +02:00
thread safety
This commit is contained in:
parent
cd3865e420
commit
4be31f1b18
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue