Announcement

Collapse
No announcement yet.

Motion controllers and networking

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

    [VIVE] Motion controllers and networking

    When i use more than one vive into a multiplayer game, motion controllers are all getting transformations from the same client.
    I think it's about "player index" input.

    My questions are:
    1) What is that player index in a multiplayer game ?
    2) Get tracked Device position and orientation has a device id input - it's the player index ?

    Hope you can answer me, thanks in advance,
    Greg
    My blog about video game development and game engines (FR + Translation)
    My books about Unreal Engine 4 & Blender Game Engine (FR only)
    Facebook - Twitter - Youtube

    #2
    here is my rough guess, haven't been able to run VR preview yet with my Vive CV1. But controller idea is pretty much the same. You are in a Pawn, you need to get the pawn owner(a PlayerController), and then get the player index from there(on server), then set the index.

    I will have to setup my UE4 first, and possibly just compile from github source to make it work, cause both UE4 and SteamVR is a moving target, compile and update is probably a safe bet.

    It's hard to even find someone that have a vive to do multiplayer test I guess, so gotta find a buddy soon.(I have a few in local indie dev group that owns pre dev kit, so I can ask them to test with me once I got a build going.)

    edit: oh, and I don't know about the answer to 2nd question. not even a guess. ^^;
    Last edited by PenguinTD; 04-12-2016, 02:13 AM.
    Unreal Engine 4 Game Framework diagram for relation of all major base object types
    Unreal Engine 4 Input Event diagram, scroll down to section Input Processing Procedural
    Resident Evil Classic Camera
    RPCs official document, Must Read
    Everything you should know about replication

    Comment


      #3
      Thanks PenguinTD,
      I don't know how to get the player index from server... i wonder it was only for local playing...
      There is a function : Get my player index... but for turn base .. don't know how it functions.
      I have a second Vive (not local) to test.
      My blog about video game development and game engines (FR + Translation)
      My books about Unreal Engine 4 & Blender Game Engine (FR only)
      Facebook - Twitter - Youtube

      Comment


        #4
        2) Get tracked Device position and orientation has a device id input - it's the player index ?

        Click image for larger version

Name:	handposition.JPG
Views:	1
Size:	54.1 KB
ID:	1104343

        I just figured this out so not entirely sure with multiplayer, but ID 2 is left and ID 3 is right for the first player controller. If you run it through a loop you can get 1st ID and 2nd ID. I believe the first will always be left and the second right.

        Comment


          #5
          Hey Fantasifall, thank you, it's a good approach i think,
          Not "controller" below, but Tracking Reference - 2 entries in solo mode
          I'll test this afternoon for 2 Vives connected if it's ok
          And then i'll test the value of this into "player index" of motion controller, or using the function "Get Hand..." instead of !
          I'll post my results.
          My blog about video game development and game engines (FR + Translation)
          My books about Unreal Engine 4 & Blender Game Engine (FR only)
          Facebook - Twitter - Youtube

          Comment


            #6
            First results not good, not in multiplayer mode:
            When using Device Type Controller : there is 2 controllers detected - 2 ids: 1 and 2
            When using Device Type Tracking Reference: there is 2 controllers also detected... - 2 ids: 3 and 4
            Dont know what is what ?
            When apply theses values to Get Hand Position and Orientation, no result. It's like "controller index" and the values "ids" was not the same
            Any idea ?
            Last edited by benicourt; 04-12-2016, 09:45 AM.
            My blog about video game development and game engines (FR + Translation)
            My books about Unreal Engine 4 & Blender Game Engine (FR only)
            Facebook - Twitter - Youtube

            Comment


              #7
              Ok, we have found a solution:
              if you want to use Motion controllers in a VR Multiplayer Game, don't use Motion controllers Components !!!
              The solution is simple finally: use a replicated variable for transformations, ask "locally" with Get Hand Position and Orientation (controller 0 - each client has a controller 0) and that's all....
              We have explored many solutions... because components seems to replicate automatically, and impossible to avoid that... in 4.11.1 (others, i don't know)
              My blog about video game development and game engines (FR + Translation)
              My books about Unreal Engine 4 & Blender Game Engine (FR only)
              Facebook - Twitter - Youtube

              Comment


                #8
                A shame that that is still not fixed.
                Maybe someone should add an official bug report in Answerhub?
                I can't upgrade to 4.11.1 yet so I can't do it now.

                Comment


                  #9
                  Can we please get an update on this from Epic? Is it fixed internally, I know it's a known issue internally Wes talked about it in a stream once and even offered up code to fix it. I used it and didn't work but Im not a programmer so it couldve been poor implementation.
                  [MENTION=26876]benicourt[/MENTION] are you setting the transform of the controllers with an event tick? Have you noticed a performance drop in your game. I was using a similar setup when I was using the hydras and felt it was a little slower.

                  Comment


                    #10
                    Just jumping in here to say that I'd really like to see this fixed!
                    I'm using unreals and vives to make fantastic experiences in VR - http://youtube.com/puzzabug

                    Comment


                      #11
                      Yes, we have to use tick event to refresh positions of the motion controllers... it's possible that there is a "little" drop in performance, but very little... and it's only for multiplayer VR mode.
                      My blog about video game development and game engines (FR + Translation)
                      My books about Unreal Engine 4 & Blender Game Engine (FR only)
                      Facebook - Twitter - Youtube

                      Comment


                        #12
                        Dang, I was hoping this was fixed.

                        Updating/sending the values manually in tick is not ideal, as that means you'll also have to set up your own interpolation.
                        Storyteller - An immersive VR audiobook player

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

                        Comment


                          #13
                          I've already tried to lerp the location of the motion controllers: good idea in theory, but the result was bad for VR. You must not add a gap between hand movements and result to screen. In theory, this is only a kind of smooth. But, our brain don't like this... But, it's just my opinion after testing.
                          My blog about video game development and game engines (FR + Translation)
                          My books about Unreal Engine 4 & Blender Game Engine (FR only)
                          Facebook - Twitter - Youtube

                          Comment


                            #14
                            Ah, glad to see I'm not the only one finding this functionality broken in multiplayer.
                            Will go ahead with the get position on tick approach until this is looked at by Epic

                            Comment


                              #15
                              There are several functions in SteamVR(OpenVR actually) API doesn't seem to get used by Unreal Engine 4 last time I check the 4.11 on github(about 2/3 days ago).
                              I think majority of function have some sort of wrapper in place, but then I couldn't find where they got called. (And then Paul and Proteus gets their templates up so I then work busy on that.)
                              There is a few function that are really interesting, like getting the predicted position and orientation of tracked device with a float sec amount, so like 0.006 is like 6 ms ahead.

                              On top of this, any movement generated by HMD or controller should have their own polled events. If you check the default Pawn net update frequency, it's 100Hz just slightly higher than the display.
                              It has nothing to do with rendering side of thing and I think inputs have their own thread polling input changes to generate events.(ie. the axis events of a trigger), and we just need that to be implemented and replicate the location of motion controller components. Those functions should be exposed so as dev we can do other fancy stuff(like finding the throwing tangent).

                              I do think this is kinda high priority, if there is already an answer hub ticket, we should up vote that question(and the trello board if there is one.)
                              Unreal Engine 4 Game Framework diagram for relation of all major base object types
                              Unreal Engine 4 Input Event diagram, scroll down to section Input Processing Procedural
                              Resident Evil Classic Camera
                              RPCs official document, Must Read
                              Everything you should know about replication

                              Comment

                              Working...
                              X