Announcement

Collapse
No announcement yet.

Trace problem with HMD

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

    Trace problem with HMD

    hello.

    if i trace from camera location to forward the origin ins't the HMD position, i can't get its working.

    the same problem in the VR template from the other member. the camara location ins't the actual HMD position and that not work ok.



    anyone have a solution?.
    pd: excuse my english.

    lfw/paid modeling, painting, texturing.

    #2
    Originally posted by knack View Post
    hello.

    if i trace from camera location to forward the origin ins't the HMD position, i can't get its working.

    the same problem in the VR template from the other member. the camara location ins't the actual HMD position and that not work ok.



    anyone have a solution?.
    I need to get a world or component space location for the HMD too. The game must have it somewhere, since it's rendering the view from that position. Right now the Blueprint nodes only give you either the camera location in world space, or the HMD position in camera-relative space.

    Quite difficult to debug, too, since the Rift only works when you launch in a stand alone window, so no blueprint debug.

    Edit: Device position is always 0, 0, 0 for me, even when positional tracking works fine. (on 4.3.1 with 0.4.1 SDK... trying it with the same project in 4.4.3 now).
    Last edited by n00854180t; 10-07-2014, 04:50 AM.
    Storyteller - An immersive VR audiobook player

    Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

    Comment


      #3
      there are a old bug in the hmd position, i submit weeks ago. they fixed in 4.4.3.

      Anyway not work i try sum camera position location vector + hmd position but nothing change (i don't if this its correct and should work, there are another bug or i doing it incorrectly)
      Last edited by knack; 10-07-2014, 02:40 PM.
      pd: excuse my english.

      lfw/paid modeling, painting, texturing.

      Comment


        #4
        Originally posted by knack View Post
        hello.

        if i trace from camera location to forward the origin ins't the HMD position, i can't get its working.

        the same problem in the VR template from the other member. the camara location ins't the actual HMD position and that not work ok.



        anyone have a solution?.
        Hey, I finally fixed that bug in the VR template just now actually, traces work like a charm. I'm uploading the changes to github now but here is the quick rundown on how I fixed it.

        Click image for larger version

Name:	TracingWithDK2.JPG
Views:	1
Size:	85.7 KB
ID:	1057590

        let me know how it goes, thanks Mitch.
        UE4 VR Cookbook
        Mitch's VR Lab tutorial series
        VR Content Examples

        Comment


          #5
          that way works fine! thanks!
          pd: excuse my english.

          lfw/paid modeling, painting, texturing.

          Comment


            #6
            If anyone is interested, this is what the blueprint looks like in code:

            Code:
            FVector posTmp;
            FQuat rot;
            GEngine->HMDDevice->GetCurrentOrientationAndPosition(rot, posTmp);
            FTransform trans = GEngine->GetFirstLocalPlayerController(GetWorld())->PlayerCameraManager->GetTransform();
            const FQuat & rotInv = rot.Inverse();
            posTmp = rotInv.RotateVector(posTmp);
            FVector HMDPosInWorldSpace = trans.TransformPosition(posTmp);

            Edit (03/18/15): Fixed bug: Was using rot to rotate posTmp, must be rotInv.
            Last edited by Kepakiano; 03-18-2015, 02:02 PM.

            Comment

            Working...
            X