Flafla2 / Vive-Teleporter

A framework for Unity3D that automatically generates teleporter boundaries and facilitates the teleporter mechanic, similarly to Valve's "The Lab"
MIT License
394 stars 94 forks source link

Ignore Triggers when doing the Raycast #34

Closed derekhendrickx closed 7 years ago

derekhendrickx commented 8 years ago

When there are big Trigger area in the scene (see the screenshot below), you can't teleport inside them. When doing the Raycast, the Triggers aren't ignored.

The fix was to add 2 parameters to the Raycast method, the LayerMask and the QueryTriggerInteraction.

Before 2016-10-14 12_05_13

After 2016-10-14 12_07_30

2016-10-14 12_09_38

You can now tweak the Raycast settings by specifying a Layer Mask, decided to ignore it or not and choose to ignore the Trigger or not.

capture1

Flafla2 commented 7 years ago

Sorry for taking so long to look at these changes - I didn't have access to a Vive until this week and I had classes to worry about. Regardless these changes LGTM and are very appreciated

derekhendrickx commented 7 years ago

No problem @Flafla2, you're very welcome!