mirror of
https://github.com/lubosz/overte.git
synced 2025-04-09 14:34:02 +02:00
Add comment explaining why visualPickResult is a copy
This commit is contained in:
parent
7f189e4d10
commit
5dbebd4aae
1 changed files with 1 additions and 0 deletions
|
@ -68,6 +68,7 @@ void Pointer::update(unsigned int pointerID) {
|
|||
// This only needs to be a read lock because update won't change any of the properties that can be modified from scripts
|
||||
withReadLock([&] {
|
||||
auto pickResult = getPrevPickResult();
|
||||
// Pointer needs its own PickResult object so it doesn't modify the cached pick result
|
||||
auto visualPickResult = getVisualPickResult(std::make_shared<PickResult>(*pickResult.get()));
|
||||
updateVisuals(visualPickResult);
|
||||
generatePointerEvents(pointerID, visualPickResult);
|
||||
|
|
Loading…
Reference in a new issue