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

Commit

Permalink
added the collider option (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHodgson authored May 11, 2019
1 parent 87b61fa commit 2f6e51c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SpatialObservers/LuminSpatialMeshObserver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,17 @@ void OnMeshGenerated(MeshGenerationResult result)

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.Renderer.enabled = false;
meshObject.Collider.enabled = false;
}

// Recalculate the mesh normals if requested.
Expand Down

0 comments on commit 2f6e51c

Please sign in to comment.