wacki / Unity-VRInputModule

MIT License
89 stars 33 forks source link

Oculus Rift support added and added PhysicsRaycaster so that 3d objects also recieve pointer events. #4

Closed paulhayes closed 7 years ago

paulhayes commented 7 years ago

Added PhysicsRaycaster so that 3d objects also receive pointer events.

Set Camera to disable, so that it is not used for rendering, which is faster than setting culling to 0. Also set culling to 0 so that racast by PhysicsRaycaster works.

Added Oculus Rift SDK Support. There's now a new demo scene for OVR, and a OVRUILaserPointer component.

wacki commented 7 years ago

Hi Paul, thank you for your contributions. I am very eager to pull this into the main project. Please just note that I am currently insanely busy with school work and can't test it just now. My current goal is to test your changes and pull them in by next weekend.

paulhayes commented 7 years ago

Great.

I'm getting good results for the code in the game I'm making. But I've noticed a feature we might have to address. Currently the objects receiving these event notifications aren't given the corresponding hand, and the hand itself isn't given notifications. This makes it difficult to do FX and behaviours that relate to the specific hand that manipulated the object.

For my purpose I added an additional event dispatcher on the controller object, which passed the object that was just pointed to the hand. This served my purpose, but I don't think lends itself well to other scenarios.

BTW if you ever want another official contributor to this project, I'd be happy to add my name to it. I think it's a very worthwhile control system, as it plays nicely with so much, and allows for a great deal of functionality with controllers in a Unity flavoured way.

We could set out a roadmap, and make sure it remains a lightweight, general solution for both 2d UI and 3d element manipulation with position tracked VR controllers.

wacki commented 7 years ago

Yes, I think having you on the project as a contributor would be great. I agree that there needs to be a way to identify which hand is executing an action. And I like your idea of keeping it a lightweight solution for 2D and 3D UI with VR controllers.

The only issue I am facing at the moment is that I don't have regular access to a VR system anymore. At least for an other few months.

paulhayes commented 7 years ago

Excellent, that's great news!

I'm sorry you don't have a Vive at the moment. Luckily I have both at home, as I'm a freelance developer. So I can test easily both systems.

Add me to the list of collaborators. I'll still make my changes to a development branch rather than master, and then I'll merge when new features/fixes are fully tested.

I hope you can get your hands on a VR system again soon. Maybe if you do we can do planning meeting in Rec Room.