Announcement

Collapse
No announcement yet.

VR Expansion Plugin

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

    Im working on a VR arena for the Oculus Quest, but until that becomes available I have been testing on two Rifts running on separate computers over wifi with a third computer running as host, the problem is when one client fires a gun that activates the haptic event in the MotionController thats gripping the Gun, and for some reason the other client can feel the haptic aswell.

    I heard every client thinks of itself as player index 0 so how can i get the Player Controller of the specific player holding the weapon?

    Thanks for making the template!

    Comment


      Originally posted by coteking View Post
      Im working on a VR arena for the Oculus Quest, but until that becomes available I have been testing on two Rifts running on separate computers over wifi with a third computer running as host, the problem is when one client fires a gun that activates the haptic event in the MotionController thats gripping the Gun, and for some reason the other client can feel the haptic aswell.

      I heard every client thinks of itself as player index 0 so how can i get the Player Controller of the specific player holding the weapon?

      Thanks for making the template!
      Well that node is set to run on OwningClient, so normally it would be working fine as is? I am not sure where you are calling that function from though and you may be running haptics in other locations or somehow calling that node on all characters and not just the gripping one? You don't normally need to run haptics as a replicated node though, generally you would have an OnFired or OnUsed event that you could have the GUN fire off haptics from or notify the character to fire off haptics when it happens.

      PlayerController 0 IS the local player on every machine, you are right on that.

      On gripped objects you can also check IsHeld and pull off the motion controller that is returned and test "IslocallyControlled" on it, that would let you know if the holding motion controller is local or not. This shouldn't be needed in this specific case, but its something useful to know.


      Consider supporting me on patreon

      My Open source tools and plugins
      Advanced Sessions Plugin
      VR Expansion Plugin

      Comment


        I have been trying to learn from the 4.21 template but none of the pawn BP nodes visibly fire. I couldn't find much on the issue other than one post from 2015 saying the answer is to not use the Player Start, and instead just drag the pawnBP straight in and set the GameMode option to possess that pawn at start. This did seem to work for the blueprints not firing, but also on play causes me to drop in several feet away, outside my body, at an odd rotation. I am still very ignorant on UE4, so I am not sure how to get the pawn working right without using the Player Start.

        Has anyone else here been able to use the PlayerStart and still be able to visibly see what nodes are firing on any of the pawns in the template?

        Comment


          Originally posted by McPhearson View Post
          I have been trying to learn from the 4.21 template but none of the pawn BP nodes visibly fire. I couldn't find much on the issue other than one post from 2015 saying the answer is to not use the Player Start, and instead just drag the pawnBP straight in and set the GameMode option to possess that pawn at start. This did seem to work for the blueprints not firing, but also on play causes me to drop in several feet away, outside my body, at an odd rotation. I am still very ignorant on UE4, so I am not sure how to get the pawn working right without using the Player Start.

          Has anyone else here been able to use the PlayerStart and still be able to visibly see what nodes are firing on any of the pawns in the template?
          ? You may be looking at the wrong pawn, the game mode spawns the Vive_PawnCharacter when VR is detected (the name is a holdover from very old versions, its more than just for vive).

          It is debuggable just fine, and as for the Player Start thing, I have avoided making a game mode override which would be required to override player start behavior and offset spawn locations because I haven't felt it was a big enough reason to override yet another class for. Manually spawning at player starts also works fine, or even offsetting locations post spawn. The spawn location code in engine is sadly fairly well buried and not in the most logical location.


          Consider supporting me on patreon

          My Open source tools and plugins
          Advanced Sessions Plugin
          VR Expansion Plugin

          Comment


            Originally posted by mordentral View Post

            Well that node is set to run on OwningClient, so normally it would be working fine as is? I am not sure where you are calling that function from though and you may be running haptics in other locations or somehow calling that node on all characters and not just the gripping one? You don't normally need to run haptics as a replicated node though, generally you would have an OnFired or OnUsed event that you could have the GUN fire off haptics from or notify the character to fire off haptics when it happens.

            PlayerController 0 IS the local player on every machine, you are right on that.

            On gripped objects you can also check IsHeld and pull off the motion controller that is returned and test "IslocallyControlled" on it, that would let you know if the holding motion controller is local or not. This shouldn't be needed in this specific case, but its something useful to know.
            Yes I original tried putting it in the BP_GunActor after OnFire so then I tried putting it in the pawn with the owning client event but both players are using the same Pawn blueprint which is being replicated so i think that's where my issue lies. this pdf was helpfull http://cedric-neukirchen.net/Downloa...Neukirchen.pdf the isLocallyControlled was also helpful it totally fixed my problem!! thanks!
            Last edited by coteking; 04-11-2019, 12:30 PM. Reason: implemented the fix

            Comment


              Hi, I have a problem :-(
              Second grip is not working. When I try to grab with my second controller it just release from the first hand and get the component on the second hand. I want to grab it with two hands like in the template with the gun demo.
              Any help?

              Comment


                Originally posted by DaviDemo View Post
                Hi, I have a problem :-(
                Second grip is not working. When I try to grab with my second controller it just release from the first hand and get the component on the second hand. I want to grab it with two hands like in the template with the gun demo.
                Any help?
                It should be working with that setup, i'll have to check against another SG_Free listed item tonight to be sure since that mode isn't tested as often, but it should be working as shown (the console uses SG_Free_WithScaling_Retain which is essentially the same thing).

                Granted that is assuming that you are using the template pawn, if you aren't, then you have to choose when to add a secondary attachment point instead of swapping grips.

                *Edit* Yeah SG_Free is still working correctly, sounds like maybe you haven't implemented secondary attachments in a custom pawn? I do not automate much in my plugin, I try to have intervening steps everywhere so people can literally build what ever systems they want.
                Last edited by mordentral; 04-12-2019, 08:35 PM.


                Consider supporting me on patreon

                My Open source tools and plugins
                Advanced Sessions Plugin
                VR Expansion Plugin

                Comment


                  ? You may be looking at the wrong pawn, the game mode spawns the Vive_PawnCharacter when VR is detected (the name is a holdover from very old versions, its more than just for vive).

                  It is debuggable just fine, and as for the Player Start thing, I have avoided making a game mode override which would be required to override player start behavior and offset spawn locations because I haven't felt it was a big enough reason to override yet another class for. Manually spawning at player starts also works fine, or even offsetting locations post spawn. The spawn location code in engine is sadly fairly well buried and not in the most logical location.
                  Thanks for the response. I do not see any nodes firing on the Vive_PawnCharacter in the template, but on the default Unreal VR template they seem to be working but I have other issues on that template. I am unsure what is occurring on each of them so I am just going to start with some tutorials on starting a VR project from scratch and maybe at some point I will figure out what is going on.

                  Comment


                    Originally posted by McPhearson View Post

                    Thanks for the response. I do not see any nodes firing on the Vive_PawnCharacter in the template, but on the default Unreal VR template they seem to be working but I have other issues on that template. I am unsure what is occurring on each of them so I am just going to start with some tutorials on starting a VR project from scratch and maybe at some point I will figure out what is going on.
                    As in you can't debug them? like break pointing them?


                    Consider supporting me on patreon

                    My Open source tools and plugins
                    Advanced Sessions Plugin
                    VR Expansion Plugin

                    Comment


                      As in you can't debug them? like break pointing them?
                      No I don't think so, I suppose it could be considered debugging. Just to see the animations on the BP nodes to see which are firing as soon as I hit play, or teleport, grab things, etc. with the pawn. It makes it easier for me to understand what chain of events are happening, and when. Let's say I bring up the BP for the ClimbWallActor that moves around; I open the blueprint and watch it when I hit play, and I see the Event BiginPlay fire and the execute lines turn red. On the Vive_PawnCharacter I do not see anything firing the the BP, not even tick events. I have "Should minimize editor on VRPie" unchecked, so the BP stays on my screen when I hit play for VR Preview option.

                      Sorry, I think my verbiage is a bit off on explaining these things.

                      Comment


                        I'd like to turn off the circular Chaperone.

                        I'm looking for a function in the plug-in, but I can't find it.

                        There's 729,730 line in openvr.h
                        VREvent_Compositor_ChaperoneBoundsShown = 1410,
                        VREvent_Compositor_ChaperoneBoundsHidden = 1411

                        Can I use these to turn off the circular Chaperone?
                        How can I reference to these variables?

                        Comment


                          Originally posted by SimppleGames View Post
                          I'd like to turn off the circular Chaperone.

                          I'm looking for a function in the plug-in, but I can't find it.

                          There's 729,730 line in openvr.h
                          VREvent_Compositor_ChaperoneBoundsShown = 1410,
                          VREvent_Compositor_ChaperoneBoundsHidden = 1411

                          Can I use these to turn off the circular Chaperone?
                          How can I reference to these variables?
                          You aren't supposed to turn off the chaperone, they used to have the keys accessible to developers to turn off and I believe removed them being writable to from non overlay applications because some programs were maliciously turning off the boundries.

                          That being said I haven't specifically tested turning anything like that off since they made a statement.

                          Also I don't provide a function to write to any of the property keys as normally there is no reason to ever do so for a game, I only provide reading functions.


                          Consider supporting me on patreon

                          My Open source tools and plugins
                          Advanced Sessions Plugin
                          VR Expansion Plugin

                          Comment


                            Hi!

                            I updated project to 4.22 and installed new version of Plugin. Has there been lot of changes? My FPS Pawn isn't working correctly anymore as a Client. The relative location of the Hand components are wrong (everything under MotionController)

                            In Image below, Server is the Top one. The Sphere should be in front of player. When playing as a client, location changes to be top of the players head. Not sure what is causing this. I can adjust it in beginning of the game with Authority tests, but something doesn't feel right.

                            Any ideas? Thanks a lot!

                            Image:
                            https://i.imgur.com/vKtPzC5.png

                            edit: I can bypass this by setting delay of 0.2 in beginplay and then set Motion Controller to be replicated.
                            Last edited by Frisco; 04-14-2019, 02:38 AM.

                            Comment


                              Originally posted by Frisco View Post
                              Hi!

                              I updated project to 4.22 and installed new version of Plugin. Has there been lot of changes? My FPS Pawn isn't working correctly anymore as a Client. The relative location of the Hand components are wrong (everything under MotionController)

                              In Image below, Server is the Top one. The Sphere should be in front of player. When playing as a client, location changes to be top of the players head. Not sure what is causing this. I can adjust it in beginning of the game with Authority tests, but something doesn't feel right.

                              Any ideas? Thanks a lot!

                              Image:
                              https://i.imgur.com/vKtPzC5.png

                              edit: I can bypass this by setting delay of 0.2 in beginplay and then set Motion Controller to be replicated.
                              Ah Yeah I forgot to mention that in the patch notes, Epic fixed an engine bug and introduced a far worse engine bug in its place with the fix.

                              I have had a bug report in since preview 1 mentioning it but they have the fix slated for 4.23. I had to modify the FPS Pawn to attach later as well. Sadly it effects more than just the hand re-positioning and I imagine that a lot of peoples projects just started having some issues in 4.22.

                              Original Issue
                              https://issues.unrealengine.com/issue/UE-43355

                              Bug report from "fixing" that issue
                              https://issues.unrealengine.com/issue/UE-70151

                              If you care to vote on the second one at one point to raise its priority, its actually a FAR worse bug than the original "fixed" one as it comes up a lot more often.


                              Consider supporting me on patreon

                              My Open source tools and plugins
                              Advanced Sessions Plugin
                              VR Expansion Plugin

                              Comment


                                mordentral I just downloaded the template, switched it to 4.20 and added in the pre-built binary package for 4.20 however when the project loaded up I get a ton of errors for about 50% of the BP's. Is this a known issue?
                                Click image for larger version

Name:	plugintonoferrors.PNG
Views:	8
Size:	477.7 KB
ID:	1607794

                                Comment

                                Working...
                                X