Announcement

Collapse
No announcement yet.

Get Head Location and Orientation in world space

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Using the above, I found this to be suitable (not the best as its just rotating the character on the Yaw, but it might good enough for others) - hope it helps.

    Leave a comment:


  • replied
    I like this way

    Click image for larger version

Name:	getHMDWorldPositionRotation.jpg
Views:	1412
Size:	54.9 KB
ID:	1682223

    Leave a comment:


  • replied
    Sorry. I wasn't around the forum the last few days :S

    My final result looks like this for the object:



    And this for the crosshair itself:

    Attached Files

    Leave a comment:


  • replied
    I have "follow HMD orientation" set in my playerCamManager as well as I do another set inside my character bp. I still have a lot of translation happening when I lean over to the sides, look up or down. Right now my setup is similar to my last setup but I am using SetWorldLocation&Rotation and Im getting the rotation of the hmd which works well I can see it rotate similarly to my rotation but the position is a bit off. Am I the only one running into this problem? here is a link i posted on imgur (the forum wouldnt let me post) http://i.imgur.com/eTWcpEN.png

    Leave a comment:


  • replied
    Originally posted by Lasyavez View Post
    Erasio this is my set up and I still get drift from my collision sphere when I lean over to the sides. Basically like your basketball video. Can you share how you got it working?
    I should have added in my post that you need to set "follow HMD orientation" to true in your PlayerCameraManager.

    Leave a comment:


  • replied
    Erasio this is my set up and I still get drift from my collision sphere when I lean over to the sides. Basically like your basketball video. Can you share how you got it working?

    Click image for larger version

Name:	HeadCollision1.PNG
Views:	1
Size:	134.8 KB
ID:	1093458

    Leave a comment:


  • replied
    Just had an opportunity to test this. Indeed it was the issue that the vector is rotated. I am not entirely sure why that is and it somewhat feels counter intuitive but it's solved now and works flawlessly!

    Thanks a bunch everyone!

    Leave a comment:


  • replied
    Originally posted by Erasio View Post
    I just tried something like that. For some inexplicable reason it still doesn't work.

    That's my setup right now. (oh yea and I'm also using a placeholder in front of the camera. Debugging a non visible object is beyond ridiculous



    And that's my ingame result:


    https://youtu.be/vOXZDEQzDoc

    The head position is waay off.

    The ball and the spotlight are childs of the camera. Not sure if that's relevant but I've worked for quite some time only in World Space so it shouldn't really matter. On top of that I've also tested a bit with rotation which seems to be correct. It's just the position that's completely off...

    We have some driver issues on my PC with oculus and unreal. It has some display errors and massively worse performance. But the positional tracking and everything else works. Just not when I try to get the location apparently. Unreal is properly registering it.
    Looks like you need to rotate/unrotate the vector.



    Edit* make sure to set "follow HMD orientation" to true in your PlayerCameraManager
    Last edited by Opamp77; 11-17-2015, 06:40 PM.

    Leave a comment:


  • replied
    Hmm...without knowing your entire setup its hard.
    I would do a fresh minimal character blueprint like the one I have, and you too, with just that snippet and component hierarchy and nothing else.
    And also maybe fresh character+camera controllers too just to be safe. And see if you get the same result. And then go from there?

    I just also added the same rotation setup you are using there and that works ok in my minimal scene, the ball sits a meter in front of my nose even as I turn my head around.
    Last edited by Fredrum; 11-13-2015, 01:08 PM.

    Leave a comment:


  • replied
    I just tried something like that. For some inexplicable reason it still doesn't work.

    That's my setup right now. (oh yea and I'm also using a placeholder in front of the camera. Debugging a non visible object is beyond ridiculous



    And that's my ingame result:


    https://youtu.be/vOXZDEQzDoc

    The head position is waay off.

    The ball and the spotlight are childs of the camera. Not sure if that's relevant but I've worked for quite some time only in World Space so it shouldn't really matter. On top of that I've also tested a bit with rotation which seems to be correct. It's just the position that's completely off...

    We have some driver issues on my PC with oculus and unreal. It has some display errors and massively worse performance. But the positional tracking and everything else works. Just not when I try to get the location apparently. Unreal is properly registering it.
    Attached Files
    Last edited by Erasio; 11-13-2015, 05:53 AM.

    Leave a comment:


  • replied
    No it sticks fine in my simple setup.
    Are you looking at the 'Sphere' or the hmdPos when you see the sliding?
    As remember that in my example I hadn't added the hmd rotation and that would make the 'Sphere' slide when you angle your head around if you have the translation offset.
    The 'hmdPos' object should still stick.

    Leave a comment:


  • replied
    Ok so i added this to set a head collision before I was just scaling the z value of the hmd by 6 to bring up into eye level (bad workaround).

    This works much better but I still experience some translation of my attached Sphere component when I lean to the sides. Have you noticed that as well?

    Leave a comment:


  • replied
    Yeah I mostly drag in cubes for my testing as I can visually see a bit more what goes on.
    But beware of the temptation to scale the cube for visibility as it will affect transforms further down the component tree/dag

    Leave a comment:


  • replied
    Fredrum is HMD pos just an empty static mesh that you are pushing the position data to?

    Leave a comment:


  • replied
    Have a look at this one and maybe try it out? It is a simple Pawn derived Blueprint.
    This should make the 'Sphere' hover in front of your face. (I have an -20.0 on the Sphere's X Transform here, and make sure it is small so you don't get inside out culling).
    HmdPos should then represent the position of the HMD.
    Note I have not bothered with any orientation/rotation here.

    Last edited by Fredrum; 11-12-2015, 04:07 PM.

    Leave a comment:

Working...
X