Hey, so you just got Touch? Fantastic. I thought I'd make a quick list of points to help you get going with Unity integration. This might be obvious stuff to others but I thought with the number of additional devs receiving Touch kits and Oculus continuing to hand them out this might benefit some. And Cyber [or anyone else], please correct me if I'm wrong about the following stuff:
1.First up, grab the latest Oculus Unity Utilities and Touch integration. This stuff is still evolving so to avoid errors and snags, make sure you're up to date. See the ReadMe file in the OvrTouch folder for these points and more info.
2.In your project, once the Touch sample package is imported, bring in the Touch prefabs and connect up the right and left hand anchors. You can find the prefabs in the OvrTouch/Content/Hands/ folder. Select the prefabs one at a time and drag the appropriate HandAnchor transform to the Touch Anchor field on the prefab.
3. To prevent odd movement glitches and update issues, it's recommended that you parent the hand prefabs into the PlayerController hierarchy, preferably under the camera coordinate space. Under the TrackingSpace node seems to work well for me.
4. Set: Edit->Project Settings->Time->Fixed Timestep = 0.01111111 to reduce judder and hand tracking latency.
5. Don't forget to try the sample scenes in the OvrTouch/Content folder. OvrTouchDemo and TapeMeasure in particular for a taste of the haptics capability.
6. Now to the fun stuff. I think Oculus prefer that we not use the blue sample hands in projects we distribute or show to others. I skinned up a pair of replacement hands you're welcome to use if you like. They're a bit higher resolution than the samples [and let's face it they're a pair of white male hands which may not suit you or your project!] but you can at least get going with them if you want to move away from the blue ones. They look like this:
In the zip file you should find the following items:
r_hand_skeletal.fbx <-- replace the identical item in your OvrTouch/Content/Hands/Models/ folder with this
l_hand_skeletal.fbx <-- replace the identical item in your OvrTouch/Content/Hands/Models/ folder with this
humanHand_3D_COLOR.jpg <-- put this wherever you prefer to keep textures
humanHand_3D_NRM.jpg <-- put this wherever you prefer to keep textures
humanHandSkin.mat <-- put this wherever you prefer to keep materials
These hands come from a blender model created by SuperDasil: http://www.blendswap.com/blends/view/81285 licensed under the Creative Commons. I have remodeled them a bit to match the Oculus touch sample joint proportions and capped the ends to be a little more pleasing to the eye. Should updated Oculus Touch samples come along with significant changes I can update these to match.
7. Finally you'll want to grab things in your own project huh. Items you wish to interact with need to be rigidBody physics objects which means you'll want to setup the usual components required for that. This may also mean you need to set up colliders etc so your objects don't fall through the floor when you put them down [or throw them for fun]. Simply add the supplied Grabbable.cs script [OvrTouch/Script/Hands/] to your object and you should be good to go.
That should get you up and running. If anyone else has useful info to share please do, the more the merrier.
Hi, I was trying to modify these hand meshes in Blender (add gloves), then export them again as fbx files and use those in a Unity project. But the importing and exporting of the fbx files breaks the armature and bone weights.
So could you maybe release export-ready blender files of these hands, so artists can modify or replace the models without breaking anything? That would be fantastic. (And maybe also tell us your fbx export settings for Blender if there's anything unusual that we need to be aware of.)
@christian.ahlersHG Hi Christian, I produced the skinned hands using Maya using the FBX import and export options there. I haven't used Blender sorry so I cannot advise you with the FBX export options Blender supports. Looking on the web it seems that indeed even importing FBX files into Blender can corrupt things, but that may be fixable by selecting the correct import options. Some of the tips on this page might help? http://digitalrune.github.io/DigitalRune-Documentation/html/6f749972-9cb2-4274-b283-c327ba45e379.htm
Is there an option i'm not seeing to force objects to snap to a pose when you pick them up, regardless of their orientation when you grab them (or, as I imagine, is this outside the scope of the Grabbable functionality)?