Forum Discussion
herix
11 years agoHonored Guest
How to attach the rift to my humanoid model in unity?
This is probably one of the most common things with the rift so I figured there's some tutorial or a wiki somewhere for this but surprisingly I haven't found any. Is there something like Tuscany but with a body attached to the Player? I can maybe figure out this on my own but I want to follow best practices and be aware of any 'gotchas'.
12 Replies
Replies have been turned off for this discussion
- GeraldExpert ProtegeI have no experience with this, but you want to attach the model to your Rift, not the other way around. The players head movements need to be the reference and can't not be changed, so move your model according to the Rifts movements.
- herixHonored Guest
"Gerald" wrote:
I have no experience with this, but you want to attach the model to your Rift, not the other way around. The players head movements need to be the reference and can't not be changed, so move your model according to the Rifts movements.
Yes, that was the first thing I tried when going trough the Tuscany demo. But then I realized how off it looks to move the whole model when turning your head. What I want to do is rotate the head alone in a natural (realistic) way, but still be able to control motion of the character by using regular inputs like keyboard ect. Similar to the way it's done in TF2. - GeraldExpert Protegethe problem is that with DK2 you get the positional tracking, so if your upper torso is not guided by the HMD controled head ...

- JoseHeroic ExplorerTry having a look at this thread: viewtopic.php?f=29&t=781 Source appears to be included.
- JonDadleyHonored Guest
"Gerald" wrote:
the problem is that with DK2 you get the positional tracking, so if your upper torso is not guided by the HMD controled head ...
My way around this was to make the body a child of the OVR camera and then apply IK to the feet. That way, when the user moves their head down with positional tracking, the body of the avatar is forced down and because of the IK'ing on the feet, the avatar crouches. There are loads of use cases that will break this but I'm guessing this will be a good broad general use solution to coping with avatars and positional tracking. - cyberealityGrand ChampionThis is a script we were using internally, that should work with the 0.3.x SDK. I'll post it here, maybe it will help.
- herixHonored GuestThanks everyone. This is great help! I'll try these out and let you know how it goes.
- tipatatExplorerThanks CyberReality for posting this! Has anyone had any luck getting this to work with SDK 0.4? I could really use a nice tutorial on attaching a humanoid model with position tracking!
Thanks!
Tipatat - CaliberMengskExplorerI have my rift as a child object of the main player controller, and set the variable of the object to get transform data for as that same parent object. It's worked fine so far, as long as you set the variable to the parent. Honestly they should have just made it where the rift object is like any other game object and just follows the parent, but oh well. I'm guessing something to do with rotating the view and such had to do with why they didn't.
My demo isn't "quite" human as I am not an artist, but it does have capsules smuuushed to look human like, and I even have a capsule attached to the rift for the head (gives you a decent view of yourself with a shadow). That said, this was originally done with skd .3, not .4. I know that the controller is working with .4 just fine (it's my attack on titan demo), but I'm sure the head gets disconnected if you move to far forward or back. - 3dvrmonsterExplorer
"tipatat" wrote:
Thanks CyberReality for posting this! Has anyone had any luck getting this to work with SDK 0.4? I could really use a nice tutorial on attaching a humanoid model with position tracking!
Thanks!
Tipatat
Just trying to bump the thread a tutorial would be great on this subject!
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
- 9 months ago