Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Refactor controller pointer code. Support layers for pointer. #788

Merged
merged 1 commit into from
Nov 21, 2018

Conversation

MortimerGoro
Copy link
Contributor

  • Refactor controller pointer code
  • Improve quality of the pointer when layers are enabled
  • Fixed depth problem when the pointer is shown on a widget that is back to another widget (e.g. dialog)

Copy link
Contributor

@bluemarvin bluemarvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pointer for Oculus is much smaller than the original pointer. I don't mind the smaller size, we should try to keep it a consistent size.

app/src/main/cpp/ControllerContainer.cpp Show resolved Hide resolved
@@ -290,12 +290,18 @@ BrowserWorld::State::UpdateControllers(bool& aRelayoutWidgets) {
resizingWidget.reset();
}

controller.pointer->SetVisible(hitWidget.get() != nullptr);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noAPI doesn't have a controller model so this pointer never gets created, needs to be wrapped in if(controller.pointer)

app/src/main/cpp/Controller.h Show resolved Hide resolved
}
if (hitWidget) {
vrb::Matrix translate = vrb::Matrix::Translation(vrb::Vector(hitPoint.x(), hitPoint.y(), 0.001f));
controller.pointer->SetTransform(hitWidget->GetTransform().PostMultiply(translate));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if (hitWidget) { needs to be in the if(controller.pointer) { block since it calls pointer->SetTransform()

@bluemarvin bluemarvin merged commit 54b55a0 into master Nov 21, 2018
@bluemarvin bluemarvin deleted the layers_pointer branch November 21, 2018 23:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants