Forum Discussion
chadstitch
6 years agoExplorer
Unity XR Oculus Touch Input Inquiry
Hi there, I am trying to use Unity XR to test an application. However, there is one key difference with using Oculus that I find quite annoying, and am trying to figure out a possible solution! ...
kojack
6 years agoMVP
chadstitch said:
MikeF said:
You could always just cast as a bool, thought you'l lose the analog functionality of the triggers
Appreciate the help a lot!
One little note: C# doesn't have implicit or explicit casts to bools. You can use the Convert.ToBoolean(). Usually for a trigger its better to explicitly give it an activation point such as 0.5f. If you don't want to use an if statement for that:
bool triggerPress = Convert.ToBoolean((int)(triggerValue+(1.0f-activationPoint)));
where activationPoint is the floating point value where you register the trigger as a button press (like 0.8f meaning you need to pull the trigger in 80% before it acts as a button press).
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 month ago