Announcement

Collapse
No announcement yet.

VR Expansion Plugin

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

    Originally posted by Lone_Rebel15515 View Post

    I'm using client authoritative, but I've tried other modes as well just for the hell of it, but same result.

    The relevant code for 'on secondary used,' is below. It properly drops the primary grip, regrips at the secondary grip point. However, if you drop the weapon from that secondary (now a primary) grip, on the server instance, the weapon floats in mid air. You can still re-grip it and everything like normal, it just doesn't simulate (while it does appear to properly simulate on connected clients).
    You don't have to set held, the plugin does that for you.

    Not sure what your drop logic is for the end of the secondary so I can't really tell just from that.


    Is it when the server itself is the one doing it or are you saying its when the server is told by the client about it. Other modes should have this problem, it would be client authoritative that would if any of them do.

    *Edit* I built it out for testing and it worked fine.

    https://blueprintue.com/blueprint/0949b662/

    Really quick and dirty mockup using the templates gun, works for client and server
    Last edited by mordentral; 05-10-2018, 11:29 PM.


    Consider supporting me on patreon

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

    Comment


      Originally posted by mordentral View Post

      You don't have to set held, the plugin does that for you.

      Not sure what your drop logic is for the end of the secondary so I can't really tell just from that.


      Is it when the server itself is the one doing it or are you saying its when the server is told by the client about it. Other modes should have this problem, it would be client authoritative that would if any of them do.

      *Edit* I built it out for testing and it worked fine.

      https://blueprintue.com/blueprint/0949b662/

      Really quick and dirty mockup using the templates gun, works for client and server

      Yeah, I dunno why I had set held in there. I think in the process of trouble shooting my code I put it in.

      Thanks, I figured out where the issue was happening. Somewhere in another bit of logic I was editing the actor's grip interface settings and accidentally set it to 'force client side movement,' and it was overriding the start settings.

      Works like a charm now, and I really appreciate you taking the time to help me troubleshoot it. The blueprint for my weapon system is getting pretty complex and so sometimes I lose the little details.

      With that though, I now have a fully functioning template for all the basic firearm types (shotguns, pistols, sniper rifles etc etc)! I couldn't have done it without your plugin.

      Thanks again.

      Comment


        Finally, I have a little something to contribute...

        Chaperone bounds BP bug (and fix!)
        (Tested with latest example: mordentral-vrexppluginexample-c64a3b80b871.zip)

        When using room scale on Vive, the chaperone bounds used by the teleport preview are wrongly oriented.
        The head aiming arrow is correct.

        Simple demonstration:
        Set Vive_PawnCharacter.bTeleportUsesThumbRotation = false (to avoid inadvertent rotation)
        Point HMD towards a corner of your play area.
        Start the game.
        Note that view is aligned with world axis (as defined by PlayerStart), and that the SteamVR chaperone is correctly at ~45 degrees to this.
        Start a teleport preview, note that although chaperone shows that you are looking towards a corner, the teleport preview says you aren't.
        Aim directly down, and you can easily see that the preview doesn't match

        The head aiming arrow is correct, but the chaperone preview is wrong.


        The fix is to correct the offset. Insert the selected elements:
        Click image for larger version

Name:	fix1.png
Views:	1
Size:	192.9 KB
ID:	1474392
        This fixes the orientation of the teleport preview.


        However, if (like me) you prefer Vive_PawnCharacter.bTeleportUsesThumbRotation = false, then you will now notice that, in general, you have a permanent rotational offset between your playspace and the game world.
        This is because on startup the game world is rotated so that the HMD view direction is as indicated by PlayerStart. So, if you are facing towards a corner of your playspace when you start to play, then the world will be rotated by ~45 degrees relative to your playspace.

        It's much nicer to not have this offset, so I added a new variable 'Align World With Chaperone Axes', which when set to true quantises the output of GetHMDPureYaw to the nearest multiple of 90 degrees. The effect of this is that your playspace (and hence chaperone region) will always be aligned with the XY gameworld axes.
        The (minor) cost is that your starting view direction will only be within +/- 45 degrees of that defined by PlayerStart.

        To add this functionality add the selected elements:
        Click image for larger version

Name:	fix2.png
Views:	1
Size:	428.5 KB
ID:	1474393


        This works whether you set Vive_PawnCharacter.bTeleportUsesThumbRotation to true or false, but isn't really needed when it is true. When it is false though, I find it essential!








        Comment


          ok. so im fighting with the door code and ive had fairly good results so fair, but im a bit stumped.

          im trying to make a door that i can only grip by the handle and open. but i would really like a door where i can turn the handle and then open the door.

          i tried with the frame as root with the handle as the grippable mesh and the door attached the handle. worked great but i couldn't figure out how to get onGrip events to activate, so i couldn't set the physics.

          and then i tried it more like your method. but then the door stopped following the handle and i really dont know why.

          note: networking is not important to this game.

          can you help me out

          Comment


            nevermind. i found it. "on child grip" thankyou.

            i thought it only did child actor class but i was wrong

            Comment


              does the vr grip interface only use certain collision channels. i made a new one and anything with that channel no longer works. is there a way around that

              Comment


                never mind. after all day yesterday and today i found it.

                Comment


                  Originally posted by spaceWumpus View Post
                  Finally, I have a little something to contribute...

                  Chaperone bounds BP bug (and fix!)
                  (Tested with latest example: mordentral-vrexppluginexample-c64a3b80b871.zip)

                  When using room scale on Vive, the chaperone bounds used by the teleport preview are wrongly oriented.
                  The head aiming arrow is correct.

                  Simple demonstration:
                  Set Vive_PawnCharacter.bTeleportUsesThumbRotation = false (to avoid inadvertent rotation)
                  Point HMD towards a corner of your play area.
                  Start the game.
                  Note that view is aligned with world axis (as defined by PlayerStart), and that the SteamVR chaperone is correctly at ~45 degrees to this.
                  Start a teleport preview, note that although chaperone shows that you are looking towards a corner, the teleport preview says you aren't.
                  Aim directly down, and you can easily see that the preview doesn't match

                  The head aiming arrow is correct, but the chaperone preview is wrong.
                  Fixed it, though it didn't take as many nodes as you used, also added an optional tracking sensor view to it. I don't know if the default template fixed this? It is from their code, and to be honest I didn't mess with the teleport stuff too much as I figure it was good enough as is and people know it.


                  As for aligning yourself at the start to world and room, that is gameplay related, so I won't be adding that in, but some may find it interesting and useful. By default when unrotated the forward direction of the tracked space is the world X+ direction.

                  Thanks for the contribution.


                  Consider supporting me on patreon

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

                  Comment


                    Originally posted by mordentral View Post
                    Fixed it, though it didn't take as many nodes as you used,
                    Doesn't surprise me - I'm still pretty new to Blueprint!

                    Thanks for the contribution.
                    No problem - thanks very much for this plugin!

                    Comment


                      Pushed a new commit to the plugin

                      Code:
                      Changed up how bIscolliding is handled for grips, doing a full single sweep now from
                      start to finish of the planned movement.
                      
                      Think I used to do this and switched to overlaps, but overlaps are suffering from precision
                      issues and causing late update stutters.
                      
                      This fixes some visual glitches with the late update settings of NotWhenColliding and NotWhenDoubleGrippingOrColliding


                      Consider supporting me on patreon

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

                      Comment


                        I get one error after update your plugin. Copied from VRExpPuginExample (master branch, 05.18.2018):
                        \Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Private\VRCharacterMovementComponent.cpp(4409): error C3861: 'DrawDebugCapsule': identifier not found
                        VRExpPuginExample works good.
                        Maybe, VRExpPuginExample don't use IWYU. (PCHUsage in Build.cs)

                        UE4.19, vs2017;
                        My fixes:
                        1) #include "Kismet/KismetSystemLibrary.h"
                        2) change VRCharacterMovementComponent.cpp(4409): DrawDebugCapsule to UKismetSystemLibrary :: DrawDebugCapsule
                        3) change 5th parameter: FRotator::ZeroRotator, and change last parameters.

                        Comment


                          Originally posted by Teklarit View Post
                          I get one error after update your plugin. Copied from VRExpPuginExample (master branch, 05.18.2018):
                          \Plugins\VRExpansionPlugin\Source\VRExpansionPlugin\Private\VRCharacterMovementComponent.cpp(4409): error C3861: 'DrawDebugCapsule': identifier not found
                          VRExpPuginExample works good.
                          Maybe, VRExpPuginExample don't use IWYU. (PCHUsage in Build.cs)

                          UE4.19, vs2017;
                          My fixes:
                          1) #include "Kismet/KismetSystemLibrary.h"
                          2) change VRCharacterMovementComponent.cpp(4409): DrawDebugCapsule to UKismetSystemLibrary :: DrawDebugCapsule
                          3) change 5th parameter: FRotator::ZeroRotator, and change last parameters.
                          Yeah that is compiled out in shipping, and not hit during debug I missed it.

                          However the correct change is just "#include "DrawDebugHelpers.h"" at the top of the cpp. It's uploaded with the correction.

                          The rollback code change is where that debug logic is.


                          Consider supporting me on patreon

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

                          Comment


                            Originally posted by TheDKSP View Post
                            (I would delete my previous post, but it's awaiting approval...)

                            I realized I got the wrong template, so I got the right one this time, but I can't build the project files. It gives me the error

                            "2>LogFileManager : error : MoveFile was unable to move 'C:/Users/Destroyer/Downloads/mordentral-vrexppluginexample-f62d5b04063c/mordentral-vrexppluginexample-f62d5b04063c/Plugins/VRExpansionPlugin/VRExpansionPlugin/Intermediate/Build/Win64/UE4Editor/Inc/VRExpansionPlugin/VRBaseCharacterMovementComponent.gen.cpp.tmp' to 'C:/Users/Destroyer/Downloads/mordentral-vrexppluginexample-f62d5b04063c/mordentral-vrexppluginexample-f62d5b04063c/Plugins/VRExpansionPlugin/VRExpansionPlugin/Intermediate/Build/Win64/UE4Editor/Inc/VRExpansionPlugin/VRBaseCharacterMovementComponent.gen.cpp', retrying in .5s..."

                            And it always fails. I tried giving it admin permissions, still failed.
                            I'm having the same issue when trying to build the latest (f6e2876) commit of the VR Expansion Template. Does anyone have any ideas? On a clean install of Windows 7 with Visual Stuido 2017 and UE 4.19.2

                            Comment


                              Originally posted by mordentral View Post

                              Yeah that is compiled out in shipping, and not hit during debug I missed it.

                              However the correct change is just "#include "DrawDebugHelpers.h"" at the top of the cpp. It's uploaded with the correction.

                              The rollback code change is where that debug logic is.
                              Yes. Thanks for support and plugin!

                              Comment


                                Hi guys!

                                I have one question. How we can change on the fly the settings in AdvancedGripSettings. I trying to deactivate AdvancedGripPhysicSettings when griping the second grip, without sucess.

                                Only view Set BPAdvGripSettings Structure and set members in structure but don't change anything. I'm a bit lost with doing this.
                                Viar Warfare - My first VR Game
                                I'm Spanish, sorry about my english, i working on it every day.

                                Comment

                                Working...
                                X