Announcement

Collapse
No announcement yet.

VR Expansion Plugin

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

    Pushed new commit to the plugin, would appreciate feedback about this one if anyone runs into any issues, its a rather large overhaul of some core character functions.

    Code:
    Overrode default engine rollback / client correction code to now pass and verify a rotation
    instead of directly accepting the clients rotation every movement.
    
    This allows me to rollback rotations and correct for packet loss with rotation based movements.
    Something that is not very important in FPS games because rotation is at the zero point but
    which is fairly important in offset HMD VR games as any minor rotation offset can cause pretty hefty
    locational offsets.
    
    Added bUseClientControlRotation to VRCharacterMovementComponent, this allows the movement
    component to use the legacy behavior of not rolling back rotations (FPS test pawns).
    
    These changes are for the VRCharacter only, the SimpleVRcharacter does not need these
    modifications to function. They also need some testing, vehicles specifically could use some testing.
    
    
    Added MoveAction_SetRotation (For just changing the rotation) and changed the snap turn and teleport
    move actions to pass in the end yaw and simulate the movement instead of taking just a location offset.
    
    Added make and conversion nodes for FVector_Netquantize and its variants...since the engine is missing this.


    Consider supporting me on patreon

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

    Comment


      Hi,

      I'm trying to use the skeletal mesh weapon from the epic templates.
      In your example template you use a Static Mesh Actor as a gun.
      I tried to duplicate this code, however I think your AGrippableSkeletalMeshActor should never work.

      At some point GripMotionControllerComponent.cpp calls this method:
      Code:
      bool UGripMotionControllerComponent::GripActor( AActor* ActorToGrip, ...
      This method has this check:
      Code:
      root->Mobility != EComponentMobility::Movable
      However the root is a Skeletal Mesh Component, which can never be Movable.
      I tried setting it Moveable in my blueprint On Construct & BeginPlay (using Rama's VictoryPlugin has a function for this).
      Now that didn't work, so instead I changed the check to: (did this for both GripActor methods)
      Code:
      bool isSkeletalMesh = root->IsA(USkeletalMeshComponent::StaticClass()) || root->IsA(ASkeletalMeshActor::StaticClass()); // Has to be movable to work. Skeletal Mesh can't be movable.
      if (!isSkeletalMesh && root->Mobility != EComponentMobility::Movable)
      {
      UE_LOG(LogVRMotionController, Warning, TEXT("VRGripMotionController tried to grip an actor set to static mobility and bAllowSetMobility is false"));
      return false; // It is not movable, can't grip it
      }
      I also modified the Weapon so that the Skeleton bones are exactly the same as the Static Gun.
      In the new skeleton I added the VRGrip sockets. Next to that I created a new Physics asset.

      The current status is that the hand now grips the BP Actor that contains the Skeletal Mesh Actor and fire's the weapon, however the weapon location and rotation are never updated (even though all settings are exact the same as the Static Mesh Gun.
      The fire does seem to work.

      Note: The drop seems to work, since when the motion controller is moved away the weapon stops fireing.

      Concluding:

      Grab animations work. (hand open / closed animations are being applied when hovering or grabbed)
      Drop works (kinda, the weapon physics don't seem to be applied (it keeps floating where it spawn), but it stops firing when moving to far from the weapon).
      Fire weapon start/stop works.
      Location / Rotation do not work for Grippable Skeletal Mesh Actors.

      So:

      1. Do you have an example using a Skeletal Mesh Weapon?

      2. Where is the motion controller rotation/location applied to the grabbed actor?

      3. Maybe there is another mobility check I missed.



      --Other notes--
      I noticed GrippedBoneName, OptionalBoneToGripName and OptionalSnapToSocketName is always None for both Gripable Static / Skeletal Mesh Actors, however socketTrans seems to be set so I guess it's not really a problem.

      I'm currently using VR Example Plugin template of 16-03-2018 (f62d5b04063c091e809a4664d4b5d3c4eabd0d0d)
      Last edited by TQwan; 04-10-2018, 01:57 AM.

      Comment


        Hi guys. I downloaded the latest VRExpPluginExample "4.18 locked" project from bitbucket repository and tryied to package it for my PS4 devkit and got this critical error:

        Code:
        ERROR: UBT ERROR: Failed to produce item: C:\Users\Administrator\Desktop\VRExpPluginExample\Plugins\VRExpansionPlugin\VRExpansionPlugin\Binaries\PS4\VRExpPluginExample-VRExpansionPlugin-PS4-Shipping.a
        Can anyone explain what I need to do to resolve this? Thanks!


        EDIT. This is was shipping build, on development I got:
        Code:
        ERROR: UBT ERROR: Failed to produce item: C:\Users\Administrator\Desktop\VRExpPluginExample\Plugins\VRExpansionPlugin\VRExpansionPlugin\Binaries\PS4\VRExpPluginExample-VRExpansionPlugin.a
        EDIT2. mordentral..? Please
        Last edited by Vemaster; 04-10-2018, 08:33 AM.

        Comment


          Hi, mordentral

          Thank you for your big work!

          I want to set custom skybox in the SteamVR (4.18.3).
          I'm used OpenVRExpansionPlugin plugin - all is ok in Editor (a little issue with panorama upside down),

          but in the packaged project instead any background dark screen.
          Please, can you test it or give some advices?
          Igor, swamper, sole proprietorship

          Comment


            Added a new game to the games list

            Nightstar Alliance


            Consider supporting me on patreon

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

            Comment


              Originally posted by 6r0m View Post
              Hi, mordentral

              Thank you for your big work!

              I want to set custom skybox in the SteamVR (4.18.3).
              I'm used OpenVRExpansionPlugin plugin - all is ok in Editor (a little issue with panorama upside down),

              but in the packaged project instead any background dark screen.
              Please, can you test it or give some advices?
              Is the texture being packaged out? it wouldn't have been referenced by the level so it may not be.

              Attempt it in a dev package with log enabled and see if it throws any warnings.


              Consider supporting me on patreon

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

              Comment


                Originally posted by TQwan View Post
                Hi,

                I'm trying to use the skeletal mesh weapon from the epic templates.
                In your example template you use a Static Mesh Actor as a gun.
                I tried to duplicate this code, however I think your AGrippableSkeletalMeshActor should never work.

                At some point GripMotionControllerComponent.cpp calls this method:

                *snip*, removed due to length from my quote

                I also modified the Weapon so that the Skeleton bones are exactly the same as the Static Gun.
                In the new skeleton I added the VRGrip sockets. Next to that I created a new Physics asset.

                The current status is that the hand now grips the BP Actor that contains the Skeletal Mesh Actor and fire's the weapon, however the weapon location and rotation are never updated (even though all settings are exact the same as the Static Mesh Gun.
                The fire does seem to work.

                Note: The drop seems to work, since when the motion controller is moved away the weapon stops fireing.

                Concluding:

                Grab animations work. (hand open / closed animations are being applied when hovering or grabbed)
                Drop works (kinda, the weapon physics don't seem to be applied (it keeps floating where it spawn), but it stops firing when moving to far from the weapon).
                Fire weapon start/stop works.
                Location / Rotation do not work for Grippable Skeletal Mesh Actors.

                So:

                1. Do you have an example using a Skeletal Mesh Weapon?

                2. Where is the motion controller rotation/location applied to the grabbed actor?

                3. Maybe there is another mobility check I missed.



                --Other notes--
                I noticed GrippedBoneName, OptionalBoneToGripName and OptionalSnapToSocketName is always None for both Gripable Static / Skeletal Mesh Actors, however socketTrans seems to be set so I guess it's not really a problem.

                I'm currently using VR Example Plugin template of 16-03-2018 (f62d5b04063c091e809a4664d4b5d3c4eabd0d0d)

                Scenecomponents auto set mobility to movable, the chain of inheritance goes ActorComponent->SceneComponent(sets movable)->PrimitiveComponent(hides movable category from BP)->SkeletalMeshComponent.

                Technically I don't have to set mobility in the static mesh component either since it is already defaulted to true. By default all primitive components hide the Mobility category, Epic specifically goes in with static mesh components and shows it again so it can be set in blueprint " ShowCategories=(Mobility)".

                In the template, literally just adding a GrippableSkeletalmeshActor, setting it to the gun and applying its physics body, it will pick up and work fine. There are also several users that ONLY use skeletal meshes for grips in their games.

                For where the rotation and location are applied, it is on TickGrips in the motion component, it pre-calculates some transforms and then applies movement logic to the held objects (unless a custom grip type, then it sends an event off to the object to handle it, itself).


                GrippedBoneName is set if the trace hits and the object is set to be per bone grippable in the template, otherwise it just grips as the actor itself (root bone).

                OptionalSnapToSocketName is kind of legacy at this point as it is less flexible, directly passing in the calculated socket transform is better as it allows controller profile editing and some other things, at some point I will remove it, but it still "works" fine for singleplayer.


                Consider supporting me on patreon

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

                Comment


                  Hi mordentral,

                  First of all thank you for this massive plugin, I hope
                  more projects will use it in the future.

                  Since I discovered UE4 recently and I started to use the Expansion Plugin a
                  few days ago, I don't know exactly what's the correct way to package a game with
                  your plugin ?

                  [Edit]
                  I added the advanced sessions plugin and now I only have 7 errors, all related to the
                  "Set override controller" function in the Sedan blueprint. Is this a known issue ?
                  Last edited by dborry; 04-10-2018, 10:32 AM.

                  Comment


                    Originally posted by dborry View Post
                    Hi mordentral,

                    [Edit]
                    I added the advanced sessions plugin and now I only have 7 errors, all related to the
                    "Set override controller" function in the Sedan blueprint. Is this a known issue ?
                    Set override controller is a new function added last week, you likely are using an older plugin build with the newer template?

                    Shouldn't have had to add the plugins to the template it should come with the correct one already.


                    Consider supporting me on patreon

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

                    Comment


                      Ah I finally figured it out, I restarted and did everything with your latest template project. Turns out I had to set Simulate Physics on the Skeletal Mesh, this is not needed for the Static Mesh.
                      Hope this helps everyone!

                      Comment


                        Originally posted by TQwan View Post
                        Ah I finally figured it out, I restarted and did everything with your latest template project. Turns out I had to set Simulate Physics on the Skeletal Mesh, this is not needed for the Static Mesh.
                        Hope this helps everyone!
                        Shouldn't have to do that either? It will auto set simulate physics if the grip type needs it.

                        Did you set simulating to false somewhere in some new nodes and override the plugin?


                        Consider supporting me on patreon

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

                        Comment


                          Originally posted by mordentral View Post

                          Set override controller is a new function added last week, you likely are using an older plugin build with the newer template?

                          Shouldn't have had to add the plugins to the template it should come with the correct one already.
                          Actually I manually added the plugin to a blank project and then I added to it the template resources in order to see how it all works.
                          That's probably why it didn't work, I didn't clone the latest commit with all the new features, I directly downloaded the most recent pre built version of the plugin (4.19).
                          Anyway, problem solved for now. Thanks !

                          Comment


                            Originally posted by Vemaster View Post
                            Hi guys. I downloaded the latest VRExpPluginExample "4.18 locked" project from bitbucket repository and tryied to package it for my PS4 devkit and got this critical error:

                            Code:
                            ERROR: UBT ERROR: Failed to produce item: C:\Users\Administrator\Desktop\VRExpPluginExample\Plugins\VRExpansionPlugin\VRExpansionPlugin\Binaries\PS4\VRExpPluginExample-VRExpansionPlugin-PS4-Shipping.a
                            Can anyone explain what I need to do to resolve this? Thanks!


                            EDIT. This is was shipping build, on development I got:
                            Code:
                            ERROR: UBT ERROR: Failed to produce item: C:\Users\Administrator\Desktop\VRExpPluginExample\Plugins\VRExpansionPlugin\VRExpansionPlugin\Binaries\PS4\VRExpPluginExample-VRExpansionPlugin.a
                            EDIT2. mordentral..? Please
                            Those "errors" don't tell me anything, there is no actual error message there.

                            Post the rest of the log

                            I did recently move some inline functions around to help with ps4, I know a couple of users are already on the platform.


                            Consider supporting me on patreon

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

                            Comment


                              I solve my grip position problem by my self.

                              The physic shapes must be attached under root, now its possible to use VRGripP1 socket in the skeletal mesh.
                              Last edited by Foxhollow; 04-10-2018, 04:02 PM.

                              Comment


                                Pushed a new commit to the plugin

                                Code:
                                Whoops, was using wrong logic for the new snap turn introduced in the last patch.
                                
                                Fixed and added a new option to SetActorRotationVR while I was at it.
                                
                                Also removing a capsule offset override that was preventing clean projects from
                                getting the 2.15 UU offset for the capsule to correct for the movement components
                                hovering.
                                I am compiling the pre-compiled binaries now and will update them when complete.

                                *Edit* New binaries uploaded
                                Last edited by mordentral; 04-10-2018, 10:06 PM.


                                Consider supporting me on patreon

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

                                Comment

                                Working...
                                X