Unity-Technologies / XR-Interaction-Toolkit-Examples

This repository contains various examples to use with the XR Interaction Toolkit
Other
1.11k stars 363 forks source link

Feature request: Better control over raycast #57

Open skrubbeltrang opened 3 years ago

skrubbeltrang commented 3 years ago

When you use the raycast (XR Ray Interactor) the ray is always coming from the controller position and going Vector3.forward in local space of the controller. I don't see any option to customize this, maybe I'm missing it?

It would be nice to be able to set the starting point to be e.g. ControllerPosition + Vector3.forward * 0.05f and also to rotate the ray in any desired direction.

Depending on your game type you may want to adjust these settings. Even inside a single game (like Beat Saber) you can customize these settings to accommodate personal user preferences.

Maybe with the option to override relevant methods it could at least be scripted by developers per individual requirements.

visjack commented 3 years ago

I second this. The method I tried was to change the colour of the ray so there is more alpha at the start of the ray, but it appears the gradient only allows 2 alpha points and you aren't able to move them from either end of the gradient. Or at least for those points to be reflected in the line renderer