Announcement

Collapse
No announcement yet.

VR Expansion Plugin

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

    Originally posted by Lone_Rebel15515 View Post

    Awesome, thank you so much. I figured I needed to do it in local space, but had no clue how to get the data to local space.

    I have one last plugin related question if you wouldn't mind.

    I've got the movement working properly, and I only want it to move on Secondary Used. Which I've also got working. However, when I press secondary use, the the gun sort of rotates away from the secondary hand, then quickly corrects itself.

    Is this something you know of / something you know how to fix? It just jumps a bit every time I hit the use button.

    Thanks again.

    Edit: It seems like it's releasing the secondary grip for a fraction of a second, and the weapon rotation is moving back towards the primary controller's rotation, then snapping back to the secondary controller. I dunno if that helps anything.
    Your secondary grip is releasing on SecondaryUsed? It shouldn't be, OnUsed isn't actually attached to anything in the plugin itself, its a helper function for you.

    Are you sure you aren't somehow running the secondary attachment code again on used?


    Consider supporting me on patreon

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

    Comment


      Originally posted by mordentral View Post

      Your secondary grip is releasing on SecondaryUsed? It shouldn't be, OnUsed isn't actually attached to anything in the plugin itself, its a helper function for you.

      Are you sure you aren't somehow running the secondary attachment code again on used?
      Okay, so looking at it, it seems to have something to do with how I was attempting to use the gameplay tags. I basically disconnected all the code I had attached to the various functions and it was still happening.

      Currently the setup I was trying to use was grip the secondary with trigger, then use trigger down for "on secondary used," then trigger release for "on end secondary used ." I was using the grip for secondary drop. Basically, I wanted to keep grabbing consistent with the rest of the things in the game, but also thought that using grips may be awkward for moving the shotgun pump, so thought trigger would also be ideal for use.

      It seems that having grip and use to the same button is causing it to release the grip for a moment then re-grab. It does work, however, if I use trigger for grab and drop and then simply use grip press and release for the use functions.

      Edit:
      Okay, so I tested this on a fresh install of the template as well, to make sure it wasn't something I specifically did in the mess of code I have. If you change the gameplay tags on gunbase to drop secondary with grip and to use secondary with trigger, it'll do the twitch thing.

      So I'm also finding that if I set the default gunbase values to:
      Secondary Grip = side grip
      Secondary Drop = side grip
      Secondary Use = trigger
      Secondary End Use = trigger release

      Then it's not allowing me to secondary grip with the side grips at all.

      I cleared it back to default values as well, then set secondary grip and secondary drop to side grip and it doesn't appear to be letting me secondary grip with the side grips at all. Dunno if all this is helpful or if I'm simply missing something here.
      Last edited by Lone_Rebel15515; 01-22-2018, 09:26 AM.

      Comment


        Originally posted by Lone_Rebel15515 View Post

        Snip.
        Currently Drop is priority over use in the BP, arguably it should be the other way around. Regardless you shouldn't have them on the same button anyway as if it is the other way around then you can't drop secondary.

        You can delete/add gameplay tags during runtime (the gunbase does this on grip), to remove grip/drop on trigger and replace it with grip/drop on side grip (like it does when held at the handle for the primary grip).


        As for the setup, yeah I found a missing check in the BP from when I converted everything to the cleaner gameplay tag checks. I fixed it and fixed a missing return in the DropOrUseSecondary function as well. The template repository is updated with the corrections.


        Consider supporting me on patreon

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

        Comment


          Awesome, thanks for the feedback. I think it'll be just fine now with the update and your advice. I'll give it a look in a bit when I get home from work.

          My wall of text was a bit confusing, but I had use and grab on the same button, but drop on another, because like you said, it would cause conflict / keep you from dropping altogether.

          That's why it was confusing me, as with the primary grip in gunbase, use and grip are both on trigger, so I figured I could do the same for secondary.

          I did edit the gameplay tags in the actual gunbase event graph and was still having the issue.

          Anway, thank you again for all the help.


          EDIT:

          Your update fixed the issue! No more twitching when secondary trigger is set to use. Thanks again!
          Last edited by Lone_Rebel15515; 01-22-2018, 07:12 PM.

          Comment


            I hope you don't mind me asking a question. If this is the wrong place to post this question I apologize. I am new to Unreal and am trying to learn blueprint and I created a room with a light and and one of your button actors you included in your VR plugin. I come from a C# background so I am familiar with coding. I can get my light to turn on by changing the visibility of my light in the Event BeginPlay on my level blueprint so I know my light is good. However, when I try to use the Button Pressed Delegate Signature of the Button actor in my level blueprint and attach it to the Toggle Visibility it never fires. Even when placing a Breakpoint on the Button Pressed Delegate in the blueprint it never breaks. It obviously breaks if I put breakpoints in the Button Actor's class, but the event never seems to get forwarded to the Level Blueprint. Is there more that I would need to do to get this to work?

            I also see you have some sort of electrical target array in which I assume you can set it to change multiple targets. I tried also adding Current state changed on my button actor instance inside my level blueprint but that does not seem to fire either.

            Is there any example documentation on how this should be wired up in blueprint?

            Any help would be greatly appreciated.

            Thanks,

            Jack

            Comment


              Originally posted by Jack0623 View Post
              I hope you don't mind me asking a question. If this is the wrong place to post this question I apologize. I am new to Unreal and am trying to learn blueprint and I created a room with a light and and one of your button actors you included in your VR plugin. I come from a C# background so I am familiar with coding. I can get my light to turn on by changing the visibility of my light in the Event BeginPlay on my level blueprint so I know my light is good. However, when I try to use the Button Pressed Delegate Signature of the Button actor in my level blueprint and attach it to the Toggle Visibility it never fires. Even when placing a Breakpoint on the Button Pressed Delegate in the blueprint it never breaks. It obviously breaks if I put breakpoints in the Button Actor's class, but the event never seems to get forwarded to the Level Blueprint. Is there more that I would need to do to get this to work?

              I also see you have some sort of electrical target array in which I assume you can set it to change multiple targets. I tried also adding Current state changed on my button actor instance inside my level blueprint but that does not seem to fire either.

              Is there any example documentation on how this should be wired up in blueprint?

              Any help would be greatly appreciated.

              Thanks,

              Jack
              You have to bind to the event of that specific button if it is remote, type in Assign or Bind in the context menu for the component reference. The green + event additions are only for Actor local context, they don't work outside of the owning actor. The binding is for a second remote multicast delegate that I have alongside it that is also called and works with outside actors and blueprints ( as is engine best practices).

              I did some quick searching for someone explaining it better visually for you: https://answers.unrealengine.com/que...blueprint.html

              The specific workflow is: https://docs.unrealengine.com/latest...gAndUnbinding/

              the confustion is understandable though, since selecting the reference still shows the big green assignment button, but it only creates a template event when out of local context.


              *Edit* A note, originally the button on the mirror was a blueprint example, when I made C++ versions I deleted them all but left that one as an actor. You can literally just add a VRButtonComponent on any actor that you wish now.
              Last edited by mordentral; 01-23-2018, 12:28 AM.


              Consider supporting me on patreon

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

              Comment


                Hey mordentral.

                After all this time I'm still very excited about the plugin. Great work!

                I'm now trying to get multiplayer working. For that I'd like to test multiplayer like you do here: https://www.youtube.com/watch?v=SpNaP2Iysa0
                I know how to switch to fps vive pawn. So I have one laptop with the fps vivepawn and one with the normal vive pawn.
                Been searching this thread but could't find someone asking this question unfortunately.

                Just how do you start the server in the FPS vive pawn game? And can you play in editor or do you have to package the game first?

                Thanks a lot.

                Comment


                  Originally posted by Silpher View Post
                  Hey mordentral.

                  After all this time I'm still very excited about the plugin. Great work!

                  I'm now trying to get multiplayer working. For that I'd like to test multiplayer like you do here: https://www.youtube.com/watch?v=SpNaP2Iysa0
                  I know how to switch to fps vive pawn. So I have one laptop with the fps vivepawn and one with the normal vive pawn.
                  Been searching this thread but could't find someone asking this question unfortunately.

                  Just how do you start the server in the FPS vive pawn game? And can you play in editor or do you have to package the game first?

                  Thanks a lot.
                  Default setup is over steam as its easier for multiple VR players to test with.

                  L button turns on laser beams for the FPS pawn and you can interact with the server menu to host / join. In game the app menu button on the vive pawn turns on the lasers for interacting with the menu (oculus is missing an equiv button in openVR because it is taken up for steam menu, so i need to rebind that key still for touch).

                  The actual session blueprints are in the 3DMenu, its not exactly the best place for them but I wanted people to be able to just delete that one actor and not have any assets tied to my session plugin anymore for the template.

                  You can't play in editor currently because both instances that are spawned will be VR and even standalone can not find sessions as it can be a different build ID. Just packaged as Development since you don't have to do anything special for that for testing.

                  *Edit* I will note, though I haven't tested it in 2 steamVR updates the last I knew the SteamVR Home Beta being on takes context for the steam sessions and breaks the UE4 Steam Subsystem (won't load). Unless directly running the exe from steam you'll want to turn off the Home Beta if you can't host/find over steam.
                  Last edited by mordentral; 01-23-2018, 12:12 PM.


                  Consider supporting me on patreon

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

                  Comment


                    Heeey Mordentral!! I've a question. Is possible to convert sedan example into a motorboat? If so, how would it be possible to do it? Thaaaaaaaaanks!!!

                    Comment


                      Originally posted by mordentral View Post

                      Default setup is over steam as its easier for multiple VR players to test with.

                      L button turns on laser beams for the FPS pawn and you can interact with the server menu to host / join. In game the app menu button on the vive pawn turns on the lasers for interacting with the menu (oculus is missing an equiv button in openVR because it is taken up for steam menu, so i need to rebind that key still for touch).

                      The actual session blueprints are in the 3DMenu, its not exactly the best place for them but I wanted people to be able to just delete that one actor and not have any assets tied to my session plugin anymore for the template.

                      You can't play in editor currently because both instances that are spawned will be VR and even standalone can not find sessions as it can be a different build ID. Just packaged as Development since you don't have to do anything special for that for testing.

                      *Edit* I will note, though I haven't tested it in 2 steamVR updates the last I knew the SteamVR Home Beta being on takes context for the steam sessions and breaks the UE4 Steam Subsystem (won't load). Unless directly running the exe from steam you'll want to turn off the Home Beta if you can't host/find over steam.
                      Great! It just works as in the video I can finally test if the things I created actually will work in multiplayer...

                      I did have to disable SteamVR Home beta, remap the laser beam to a different button because I've got the Oculus and create a new steam account for my laptop but now it works perfect.

                      I assume this is 1 to 1 in comparison with a released game right?

                      Thanks!

                      Comment


                        Originally posted by Silpher View Post

                        Great! It just works as in the video I can finally test if the things I created actually will work in multiplayer...

                        I did have to disable SteamVR Home beta, remap the laser beam to a different button because I've got the Oculus and create a new steam account for my laptop but now it works perfect.

                        I assume this is 1 to 1 in comparison with a released game right?

                        Thanks!
                        Except for rare random differences with dedicated servers yes.

                        If you package shipped you need to also include an app_id.txt file in the .exe directory with your steam app ID in it.

                        Dev is nice for testing because you retain console and debug rendering.

                        *Edit* That being said, I tend to test new multiplayer things with two flat pawns in editor, and then package out to test specifically in VR at the end of the feature to ensure it works right. The core multiplayer work being done for my plugin I don't need to re-test base things too often. This is waaaaaaaaaay faster iteration and retains easy debuggability and easier profiling.
                        Last edited by mordentral; 01-23-2018, 02:38 PM.


                        Consider supporting me on patreon

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

                        Comment


                          Pushed a few commits the past week, just collating them here.

                          Plugin

                          Code:
                          Fixed VR Lever not responding when max of an axis is 0.0f
                          
                          Corrected a replication issue with client authoritive grips where
                          since I don't replicate some variables when the secondary grip is being sent as removed
                          the server would lerp incorrectly back to base position.
                          
                          Improved the Parent Relative attachments behavior when lerping with yaw tolerance
                          
                          Changed the additive transform for grips so that it applies seperately from the secondary grip rotation.
                          This stops the addition rotation from being overidden by a secondary grip.
                          Template

                          Code:
                          Fixed some bad logic in the Vive_PawnCharacter that kept secondary grips from behaving correctly sometimes.


                          Consider supporting me on patreon

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

                          Comment


                            Hi Mordentral,

                            Here is a little present for the awesome VRExpansionPlugin.

                            I came across another problem where I wanted to use the VRLeverComponent for and I decided to work again on it to make it rotate smoothly over the flip point. It is in a state now that I thought the VRExpansion Plugin could also make use of it, so I took my freedom to send it to you.



                            Below you find attached a 4.18 version of the example project just like in the video. The code additions in VRLeverComponent should just work fine also in 4.19 from what I saw. I marked every code change necessary with the comment "spaceharry" in h. and cpp file. Feel free to also use the mesh from my video in your example project.

                            Edit: The files here didnt have the correct version. You can find them below or later in a new version of the ExpansionPlugin soon.


                            Basically the lever rotation limited to yaw and pitch now works like this kind of telescope and it behaves almost like it when moved by motion controller.

                            Click image for larger version  Name:	meade.jpg Views:	1 Size:	21.5 KB ID:	1417598

                            As of now there are two variable exposed to blueprint to take ajustments on: FlipZone and LerpOutSpeed.

                            FlipZone defines a zone on a sphere near where the lever would flip around its roll axis or small location changes from the motion controller would cause swirling rotational motions. As of now inside this zone the lever can only increase or decrease in pitch to avoid those problems. This FlipZone value can be increased to further stabilize swirlmotion or decreased to allow more yaw rotation before locking in.

                            LerpOutSpeed is just for lerping back to "real" motion controller location after leaving the flipzone.


                            I didnt need to limit the rotations axis as of now, but I surely will take a look at it. Also currently this lever doesnt return to its initial position. This implementation is not perfect in any sense, but still I thought that someone could use a light projector on the stair platform.

                            cya,

                            spaceharry
                            Last edited by spaceharry; 01-24-2018, 12:23 PM.

                            Comment


                              Originally posted by spaceharry View Post
                              Hi Mordentral,

                              Here is a little present for the awesome VRExpansionPlugin.

                              I came across another problem where I wanted to use the VRLeverComponent for and I decided to work again on it to make it rotate smoothly over the flip point. It is in a state now that I thought the VRExpansion Plugin could also make use of it, so I took my freedom to send it to you.
                              Below you find attached a 4.18 version of the example project just like in the video. The code additions in VRLeverComponent should just work fine also in 4.19 from what I saw. I marked every code change necessary with the comment "spaceharry" in h. and cpp file. Feel free to also use the mesh from my video in your example project.

                              Basically the lever rotation limited to yaw and pitch now works like this kind of telescope and it behaves almost like it when moved by motion controller.


                              As of now there are two variable exposed to blueprint to take ajustments on: FlipZone and LerpOutSpeed.

                              FlipZone defines a zone on a sphere near where the lever would flip around its roll axis or small location changes from the motion controller would cause swirling rotational motions. As of now inside this zone the lever can only increase or decrease in pitch to avoid those problems. This FlipZone value can be increased to further stabilize swirlmotion or decreased to allow more yaw rotation before locking in.

                              LerpOutSpeed is just for lerping back to "real" motion controller location after leaving the flipzone.


                              I didnt need to limit the rotations axis as of now, but I surely will take a look at it. Also currently this lever doesnt return to its initial position. This implementation is not perfect in any sense, but still I thought that someone could use a light projector on the stair platform.

                              I'll look into it, there are obviously still some rotational accumulation issues with it and some drifting, but that is to be expected with what is basically a corrected lookat. It has a pretty nasty singularity where it flips continuously trying to account for the last position over and over (don't let go of the lever like in the video, keep sweeping it around without letting go).

                              I wouldn't be adding it to the XY one though like you did, I don't want that mode to act in that manner, but it would be a good fit for XZ assuming the singularity and drift can be accounted for.
                              Last edited by mordentral; 01-23-2018, 09:04 PM.


                              Consider supporting me on patreon

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

                              Comment


                                I think I mixed something up when merging the code to your lever component. It shouldnt swirl at all.

                                Let me check and send you the correct one... Also I added it to XZ before...

                                Comment

                                Working...
                                X