Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Commit

Permalink
added collider display option work (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHodgson authored May 11, 2019
1 parent 62b56b7 commit 2842a2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SpatialObservers/WindowsMixedRealitySpatialMeshObserver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,16 @@ void OnDataReady(SurfaceData cookedData, bool outputWritten, float elapsedCookTi

if (displayOption != SpatialMeshDisplayOptions.None)
{
meshObject.Renderer.enabled = true;
meshObject.Collider.enabled = true;
meshObject.Renderer.enabled = displayOption == SpatialMeshDisplayOptions.Visible ||
displayOption == SpatialMeshDisplayOptions.Occlusion;
meshObject.Renderer.sharedMaterial = (displayOption == SpatialMeshDisplayOptions.Visible)
? MeshVisibleMaterial
: MeshOcclusionMaterial;
}
else
{
meshObject.Collider.enabled = false;
meshObject.Renderer.enabled = false;
}

Expand Down

0 comments on commit 2842a2c

Please sign in to comment.