-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Line pointer refactor for performance #6863
Line pointer refactor for performance #6863
Conversation
… instead of every getpoint()
This comment has been minimized.
This comment has been minimized.
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
mrtk_docs fix on way |
I've added a ticket for tracking the 2.3 breaking changes: #6922 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Pending the TODO
s in your PR description.
Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/ShellHandRayPointer.cs
Outdated
Show resolved
Hide resolved
…ellHandRayPointer.cs Co-Authored-By: Kurtis <kurtie@microsoft.com>
…hub.com/Troy-Ferrell/MixedRealityToolkit-Unity into users/trferrel/line-pointer-refactor-v2 # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
@Troy-Ferrell, this looks to be blocked by a merge conflict and a test failure (related?) |
…ctor-v2 # Conflicts: # Assets/MixedRealityToolkit.Tests/PlayModeTests/PointerTests.cs
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
Overview
Change notes
This change refactors the default hand ray pointer prefabs and classes for more optimal performance. Key impacts
LinePointer
class has been simplified to only support raycast along a 2-point line (one raystep). Support for multi-raystep has been pushed down to a new inherited class,CurvePointer
. Teleport pointers now inherit from this class. Simplifying LinePointer reduces some overhead in calculating points along the curve and number of raysteps involved.The
ShellHandRayPointer
has been re-worked to alternate the line renderers material instead of doing weird things using twoMixedRealityLineRenderer
components. The dual render components were weirdly setup and doing duplicated work to the unity LineRender. If the old line renderer properties are used, a warning is logged during start alerting user to switch to new propertyDefaultControllerPointer prefab has removed the dual MRLineRenderers in favor of one. Also LineStepCount on the MRLineRenderer left is lowered from 16 to 10.
Fixed line renderer issues (did not respond to FadeLineOnEnable toggle, gradient value setting and material tiling)
Breaking changes
ShellHandRayPointer
has been removed of it's MRLineRenderer properties (lineRendererSelected
andlineRendererNoTarget
)IMixedRealityPointer
now requires aReset()
method in it's interfaceUpdated #6922 for migration in properties change on ShellHandRayPointer
Added test under PointerTest.cs to confirm line pointer raycasts straight and curve pointer works with teleport pointer collisions
BEFORE
![image](https://user-images.githubusercontent.com/25975362/70744055-d4ade780-1cd5-11ea-9028-c4d15e1f209d.png)
AFTER
![image](https://user-images.githubusercontent.com/25975362/70744158-00c96880-1cd6-11ea-9e82-25f5617be967.png)
Changes
Verification
Tested
HandsInteractionExampleScene in editor
HandsInteractionExampleScene VR on Device
Teleport system VR on Device
ExamplesHub app on HL2 device (IN PROGRESS)