Announcement

Collapse
No announcement yet.

VR Expansion Plugin

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

  • VR Expansion Plugin

    VR Expansion Plugin

    *Updated: 10/21/2017*


    10/10/2016 - No longer OpenVR specific, if platform does not support OpenVR the plugin no longer compiles out the OpenVR specific code.
    Also all OpenVR code is in a separate module that can be disabled.


    Playable Template Demo
    Template Packaged Download


    This plugin is intended to ease the creation of VR games/experiences in UE4. It is up to quite a few different additions now and has a fleshed out wiki to help ease into it (may be a version or two behind at times, I attempt to update it when I can, the template is generally the best informational tool). It is also intended to be compatible with multiplayer experiences without any direct changes from the end user, most of the relevant components / actors replicated themselves over the network with some customization included.

    *Note* I wouldn't always suggest using this plugin AS IS for a large project with experienced developers, in that situation you may be better off using code from it on a case by case example of how different systems could be achieved in engine. I can't support every possible interaction in VR and some things could be done cleaner in a less general way for projects that don't need to support uncommon interactions or want the features in already implemented systems, shoehorning the plugin into projects already in process might not be the best solution. That being said there are a decent amount of projects that switched over while already in development and are doing fine.

    For small projects as far as I am aware it should be a quick and easy way to get going with more advanced VR interactions.

    It is fully Blueprint implemented but can be manually linked to and used in c++ if needed.

    Consider Supporting Me On Patreon

    Some Games In progress or released that currently use the plugin (These are just ones I know about)
    Code:
    Released
    Surv1v3 Early Access
    Dark Frontier Early Access
    Run Of Mydan Early Access
    Gladius Early Access
    Water_Planet
    The_Nest Upcoming Multiplayer Update uses the plugin
    Island_359 Used at least some code from it, unsure as to how much integration.
    Unforgiven: Missing Memories - Child's Play Used a very early version of the plugin
    Until None Remain
    
    WIP
    Viar Warefare
    Espire1
    Honeypot Espionage
    Plugin Pre-built Downloads
    Plugin Repository

    https://bitbucket.org/mordentral/vrexpansionplugin

    Plugin Example Template Repository

    https://bitbucket.org/mordentral/vrexppluginexample


    Repository Wiki Page

    https://bitbucket.org/mordentral/vre...ugin/wiki/Home


    Feature Request Submission:
    Feature Request Trello Board

    To submit a request, send an e-mail to
    Feature Request E-mail
    With the subject being the Card title and the body being the card body.

    Repository Installation articles By Community Member kusogaki77

    Basic Installation Step-By-Step


    Specific Commit Download Tutorial


    Pre-built binary useage

    Template Note:

    I would like to note by the way that everything currently in the template is an example of what I think is best practices (though maybe not implemented as well as I would for an actual game), not everyone is going to need the same set up and not everyone is going to need a full VRcharacter. Custom pawns that just use the motion controllers and camera / parent relative component would be useful to people that don't want gravity / collision. It also has to give examples of far more things than an average game is likely to use, so there WILL be refactoring involved if it is used as a base for one (input bindings for one).

    Template Change Log
    Code:
    10/13/2017
    
    Fixed a teleport controller bug with moving it too quickly and it ignoring the navigation mesh, this is a problem with Epics template setup that I copied over for people, so be warned if using their default teleport setup.
    
    Added an option to the laser beam on the teleport controller to use smoothed (wobbly) motion like the VREditor uses (see below in plugin notes)
    
    09/21/2017
    
    Added VRGameViewportClient class blueprint override to template and assigned it as the default GameViewportClient class.
    This is to show how to change the input parameters for it.  
    
    07/31/2017
    
    fixed door warning
    
    added offset to spawn logic so that player should arrive
    correctly regardless of HMD offset.
    
    Fixed car not using driver since I remade how it handles seats
    
    Set the VivePawnCharacter to default smooth the camera replication and to a 60htz rate instead
    of the 100htz default.
    
    Changed how out of body movement works
    
    Now I am spawning a camera actor locally instead of having an attached child actor component
    
    First this removes a component/actor from non local characters per character, so it is a slight perf savings.
    
    Secondly this removes the damned "vivepawncharacter needs to save" regardless of changes made to it.
    Child actor components are still largely bug ridden and messy.
    
    07/28/2017
    
     *Car has all 4 seats filled in now.*    
    
     I also went into the DropActor RPC in the blueprints for VivePawnCharacter and quantized the requested  
     angular and linear velocities as well as only passing in the object now instead of the grip (which grip  
     is now reconstituted on the other side by getting grip by object).  
     This cuts the bytes used to replicate this RPC to 1/5 of what it was.
    
    07/23/2017
    
    Stable enough for beta release on the car (is not entirely complete, please ignore half done parts)  
    
    Made the steering wheel of the car a lever now instead of a dial and added a new mesh for it  
    
    Added new template level section specifically for playing with the car
    
    07/20/2017
    
    Skeletal mesh fixed when it has a rotated root bone and is gripped with physics
    
    Still not as optimal as I would have liked, but having to deal with center of mass
    and the root bone rotational difference between physics body and main is aggravating.
    Also fixed the center of mass setting to an offset location when the object is scaled.
    
    Added ClientSideAuthoritive_NoRep grip replication mode, acts just like ClientSide_Authoritive
    except it doesn't tell the server about it. Basically it behaves like the old LocalGrip identifier.
    
    Added IsALocalGrip function to the blueprint characters to clean up checking BOTH of the modes
    instead of just the one in some spots now (IE: where it chooses to call grip on client or server
    side).
    
    Set all grippable components to auto replicate by default.
    
    Otherwise a lot of funky things can happen, I think I removed this setting a few patches ago but it
    has proved to be important in most cases in multiplayer so i'm forcing it to default true
    again. Can still be disabled if you want.
    
    *Note* Stereo layer widget components appear to be updating incorrectly all of the sudden, I think this has to do with
    the new steamVR patch. I haven't found a fix yet, I can't test on Rift to see if it is working as intended there at the moment.
    
    
    07/09/2017
    
    Changed up the VRCharacter so that gripping and using is also  gameplay tag defined now.
    Everything is now run off of one generic function that manages any button passed in
    by comparing gameplay tags. Falls back to default tag values where appropriate.
    
    *Note* Original character is now "VRCharacter_Legacy" and will be dropped at some point.
    
    This allowed me to delete many extra functions that were pretty much just re-implementing
    drop or grip logic for different buttons.
    
    Removed a bunch of functions from VR character that were not needed.
    
    Sorted all functions in VR character into categories.
    
    Unlinked all OpenVR specific code (except for the controller loading since it just fails when out of platform).
    
    Added an example StereoViewIndex post process material with a custom node that returns the eye index both in AND out of instanced stereo mode. This can be used for
    stereoscoptic textures.
    
    Added HadHandSpecificSlots to gameplay tags so that the GetCorrectSocketPrefix can return VRGripLP or VRGripRP / VRGripTouchLP / VRGripTouchRP.
    
    06/11/2017
    
    Added a button type enum to the button component and functionality for a press
    button instead of just toggle (button still needs a lot of cleanup).
    
    Made 3D keyboard a component now by using the new function I added to the
    VRExpansionLibrary.
    
    Cleaned up 2D and 3D keyboard setups, 3D keyboards still need some work, 2D is pretty much fully functional.
    
    06/05/2017
    
    Added new prelim procedural VR keyboard
    
    Fixed a bug with the widget interaction components not releasing that was introduced with the BP overhaul.
    
    Moved more of the input mappings into the Inputconfig and out of being directly declared in the character.
    
    05/29/2017
    
    Added boolean to enable Thumb rotation of teleporting, shows a second
    teleportation arrow that shows your ending facing direction.
    (first trello listed feature request)
    
    Re-worked sliding motion slightly to use a rotator created from the
    thumb pad axis values for direction instead of forward + right
    vector directions added together. Should be cleaner.
    
    Changed rotate character function to work more logically.
    
    All booleans that control behavior now have their own category for easy access, including the new UseTeleportThumbRotation boolean.
    
    Fix to sessions plugin for 4.16, ported to template.
    
    05/18/2017
    
    Moved gameplay tags into a data table
    
    Made gun example a Client_Authoritive grip
    
    Fixed some gameplay tag nodes in the character, added a fallback secondary release
    with trigger release if an object doesn't have any secondary drop tags.
    
    Changed the RIP motion to have "with hands" and "without hands" influence.
    Also fixed the low end velocity, should have only been the head.
    
    Modified all template objects to use the gameplay tags for drop buttons and secondary grip
    drop buttons.
    
    Modified the blueprints in the vr character to support the gameplay tags and cleaned them
    up in general.
    
    Added DefaultGameplayTags.ini to repository, this contains the generic default tags currently
    in use in the template project.
    
    Cleaned up most of the character blueprints
    
    Now using the FTransform_NetQuantize in character RPC's that send a transform
    
    Gun grip location equality check is now checking within two decimals of precision
    due to the new NetQuantize transform.
    
    Now destroying teleport controllers when the character is destroyed.
    
    
    05/02/2017
    
    Started adding some additional interactive objects to the level (Lever, Button, Push dial). Will be iterating over them and adding more in order to think about if I need to change any of the plugins workflow to
    make creating such things easier or not.
    
    04/13/2017
    
    Also added a new low end velocity smoothed value to RIP motion so that the cut off after ceasing motion is faster.
    
    Fix for exclusive nativization with the sessions plugin
    
    Cannot fix inclusive as it crashes due to an engine bug slated to be
    fixed in 4.15.2 and 4.16
    
    04/12/2017
    
    Added a RotateCharacter function to the VRCharacter to show how to use
    the new blueprint node to rotate the character around the HMD's relative position (for things like smooth / snap turning).
    
    04/30/2017
    
    Added example of drawing an OpenVR HMD camera to a texture for the vive_PawnCharacter.
    
    Removed debug print string from the gun base.
    
    03/26/2017
    
    Added new rolling average and exponential low pass filter nodes to template
    
    Converted smoothing step for RIP and armswing to use the new nodes.
    
    Also included an implementation of a rolling average low pass filter in blueprint for reference.
    
    Added new test actor "VRStereoWidgetActor" which uses the new VRStereoWidgetComponent.
    
    03/13/2017
    Fixed Vivecharacter not picking up base simulating actors anymore (when changing for the new IsHeld interface function I set a node wrong)
    
    Added the plugins new check for destructible components being fractured, not entirely sure that I should even be doing this.
    In the future I may force the end user to properly clean up destructible meshes instead by dropping them or attaching them to
    a root component that is gripped instead.
    
    Currently auto drops the held component when it detects fracturing
    
    03/06/2017
    
    Changed VRExpansionPlugin to be two seperate modules, one for all platforms, and one for OpenVR
    
    Replaced VRExpansionLibrary Actor Component with OpenVRExpansionLibrary Actor Component on the VR Characters.
    
    02/23/2017
    
    Added a retriggerable delay prior to setting up the widget interaction components.
    This checks the player state for validity and only once it returns valid does it continue on and
    set up the interaction.
    
    Since player state takes a while to replicate to the client if you call that function right away
    it could be invalid and never set up the correct variables for the player ID on the interaction component.
    
    02/21/2017
    
    RIP motion now uses all three tracked objects for velocity smoothing, a few exposed variables control how much smoothing is applied.
    This prevents random head motion from causing forward movement when holding the move button.
    
    Re-organized the templates folders to place all ExpansionTemplate content under one master folder.
    
    Now using the new NonAuthorityMinimumAreaRectangle) node from the ExpansionLibrary in the teleport controllers to fix room bounds in multiplayer.
    
    02/14/2017
    
    Added a mirror actor that activates when you step in front of it, don't know why, sounded like fun
    
    Added hand animations back in to the default hands, if the controller generation code is off they will function just like the Epic Template hands.
    
    Made use of new IsHeld interface function to deny gripping on objects that other characters are already holding (for multiplayer)
    
    Converted Epics pickup cubes so that they make use of the VRGripInterface (they are not GrippableStaticMeshActors though). This not only allows for checking for holding through
    the interface on them, but it also shows a brief example of how to directly add the interface to a class that doesn't already implement it. Another way would be to store
    your own GripInterfaceProperties structure and pass the values in like the default grippable actors and components do, but wanted to show direct function overriding.
    
    All objects should be multiplayer compatible now
    
    Added a server browser into the level to check for and connect / host multiplayer sessions.
    
    Fixed simple character not deriving from the simple character as of last night (oops)
    
    Added in prelim Running in place and Armswinger locomotions.
    
    01/30/2017
    (Template is now under 4.15 due to incoming version lock because of engine changes, these changes are up on the current 4.15 alpha branch)
    
    Updated to latest plugin version
    
    Added a basic climbing system to the template (as a movement mode) (currently only on the STD VR Character, simple will get it added soon)
    
    Added a fallback overlap detection to the grip trace to cover when the trace fails because of initial interpenetration.
    This keeps the traces better detection of fast moving objects but covers its weakness when interpenetrating.
    This requires that objects have "OverlapEvents" ticked on in collision properties for the fallback to work (otherwise is just the trace).
    
    01/08/2017
    
    Updated template to latest plugin version
    
    Made blueprint changes due to plugin revisions.
    Plugin Change Log
    Code:
    10/21/2017
    
    Added Epics world locked implementation as an option to the VRStereoWidgets   
    They are still buggy, but should be included anyway.
    
    Added check to ensure that we don't try to physically pick up an object that is using  
    bUseComplexAsSimple collision.  
    
    This will be more obvious as to why it is crashing out that the default Mass > 0.f  
    warning that is generated normally.  
    
    Moved netsmoother up higher in serialization.  
    
    Exposed levers bIsLerping to blueprint so things can use it (see new native lever actor  
    and how it checks it to turn off tick).
    
    10/17/2017  
    
    Fixes an issue with the new late update method in 4.18 that I early updated to.    Since it is queuing the late update now to avoid thread racing in game and render,   it applies the final late update one frame later in render thread   after the object is no longer late updated so if you don't move or update the   component (or its parent) after releasing it then it never   loses the rendering offset.    
    I am just calling UpdateComponentToWorld now on release to correct for it.
    
    10/13/2017
    
    Fixed min distance clamping with the vr slider component (oops).  
    Also added CurrentSliderProgress variable that is calculated during movement.  
    Ranges from 0.0 - 1.0 with 1.0 being 100% and 0 being 0%, also works for along the spline  
    component it is following.  
    Added SetSplineComponentToFollow function to either add or clear the follow spline.  
    
    Fixed a bug with the VRStereoWidget where in packaged builds the compiler was resolving to the wrong namespace and not using my custom scene proxy.  
    
    
    Added Euro Low Pass Filter to the plugin (same on that Epic is using with the VR Editor  
    for their laser beam smoothing). It has ResetEuroFilter and RunEuroFilterSmoothing nodes  
    in the VR Expansion Library to control it (or in c++ you can directly call the functions)  
    
    Also added an auto arc calculation node to the VR Expansion Function Library so that the  
    arc calculation and setting is faster and clean and is the same as the VR Editor.  
    
    smoothed "wobble" beams.  I normally wouldn't directly port things over, however I know that people would want the  
    same behavior if possible so that they have consistancy.
    
    Also removed a silly check left over from copying code in the VRBaseCharacter.  
    It likely had no effect but it should be removed.
    
    09/21/2017
    
    Added VRGameViewportClient class  
    This class is intended to provide support for Local Mixed play between a mouse and keyboard player  
    and a VR player. It is not needed outside of that use.    
    
    There is a new wiki page under Misc Classes that covers its use  
    https://bitbucket.org/mordentral/vrexpansionplugin/wiki/Misc%20Classes 
    
    Added functionality for the ParentRelAttachVRComponent, it can now be attached to the bottom of the capsule at the foot location
    instead of at the HMD location. Only happens when bUseFeetLocation is checked. Thanks to SpaceHarry for the initial pull
    request, I had plans to do this but kept forgetting about it.
    
    09/14/2017
    
    Added a bunch of functions/nodes to the OpenVR library to control overlay skyboxs and loading systems. They are detailed in the wiki entry below.
    
    https://bitbucket.org/mordentral/vre...unctionLibrary
    
    Corrected an issue that the Epic Motion Controllers have that was evident in my overrides of them, now removing the late update scene view if the motion
    controller is deactivated. Otherwise late updates would continue to be used and visually it would appear as if the controller was still active.
    
    09/13/2017
    
    Early implemented a new method of handling the controller late updates that Epic is
    using in the upcoming 4.18 patch.
    
    It utilizes a double buffer for the scene references in the render thread and effectivly
    solves the high velocity tracking issues that were very evident before (when moving fast
    the controllers late update would send them flying all over).
    
    also started adding some comments for incoming 4.18 changes to remind myself.
    
    There will be a lot of changes incoming due to OpenXR starting to be supported in engine.
    
    09/06/2017
    
    Added a NetSmoother component to the VRCharacters (a dummy root scene component), it takes advantage of the ClientSmoothPosition
    data that is already calculated for standard characters SkeletalMeshes and applies it to this tracked
    component root instead. This way there is a more smoothed lerp back to the correct position after
    the server finishes replicating a character move and the client already predicted it out farther.
    
    This only takes effect on simulated proxies. The root can be re-purposed in single player or locally controlled characters to handle things like simulated lean or other effects.
    I had considered adding a dummy root to the tracked devices for awhile now so people had some more flexibility without manually re-parenting but the network smoothing gave
    me an actual reason to do so.
    
    The smoothing effect can be turned off by turning off network smoothing on the character movement component, this still retains the sudden jump to the last replicated position when a simulated proxy stops being sent velocities and stops predicting position though.
    
    Added a AddDeltaAngle function to the VRDialComponent, can be used to set initial rotation / angle of the
    dial or to increment it later on. Also is now used for the GripTick tracking of the dial angle.
    
    Exposing bDenyGripping for the lever and dial components, forgot to provide a method to control this for them.
    
    09/04/2017
    
    Massive Header file cleanup to better support Non Unity Builds and Linux.
    
    Fixed TeleportMoveGrip teleporting NoTeleport and DropOnTeleport on initial
    !IsTeleport grip teleportation check. (ie: on initial grip could teleport things that don't want it)
    
    Motion controller is now only setting ReplicatesMovement on actor grips or when the held
    component is the root component. This is possible since I added the new movement replication bool
    to the grippable components.
    
    Made the new conditional replication system for saved movements more sane and extended it to
    the simple character. It costs...2 bits...more than before but is far cleaner and has less functions.
    
    08/31/2017
    
    Changed non post teleport teleportMoveGrip commands to ignore NoTeleport
    and DropOnTeleport objects and exit. *This is actually more serious than it sounds, it could cause static objects that
    aren't supposed to move to be able to slightly shift on initial grip*
    
    Added replication smoothing to the camera like the controllers have
    
    Made the first replication directly set the location instead of beginning a lerp, all other replications
    after that are lerped too. This prevents the initial 'tick' of lerp going from 0,0,0.
    
    
    Made some fixes to the movement merging/combining capability of the VRCharacter, should be more stable
    and reliable now.
    
    Now more appropriatley declaring Important moves so that they are sent again if not Acked
    (prior to this CustomInputVectors and Navigation Velocity didn't trigger as important).
    
    Made more nuanced checks for CanCombine in the saved movements that acutally allows for combining
    movements with HMD movements attached. Uses the same Dot Threshold as the acceleration combinining does.
    (5 Degrees by default).
    
    *From initial testing it appears safe now to enable MergeMovements on the movement component, if it remains stable I will default it*
    
    Removed Control Pitch and Control Roll from being replicated AT ALL in the VRCharacter.
    We never use these two values. (This saved 3 bytes per rep send)
    
    Upped CapsuleYaw from 1 byte compressed to 1 short compressed for sends
    (this cost 1 byte per rep send).
    
    (Overall this saves 2 bytes per rep send and has a higher accuracy of HMD yaw).
    
    Added alt path to restore original control roll/pitch replication if character is set to follow it
    
    I understand that this is a lot of additional code for a 2 byte per rep savings.
    
    08/30/2017
    
    Added replication smoothing to the camera like the controllers have  
    
    Made the first replication directly set the location instead of beginning a lerp, all other replications  
    after that are lerped too. This prevents the initial 'tick' of lerp going from 0,0,0.  
    
    Added IsInVRPreview node to the VRExpansionFunctionLibrary  
    
    08/29/2017
    
    Added boolean to player controller (default true) bDisableServerUpdateCamera. When true it disables the automatic view replication from the camera manager for the camera. Typically we are already sending the camera's position / rotation in VR and the replicated value isn't that useful anyway. Unreal tournament turns it off and sends the look value from the clients when important actions happen and in VR most actions happen off of direct input instead anyway. (this removes a 1000b/s replication cost or so).
    
    The boolean can be disable to return the typical engine functionality.
    
    Added ExLight RPCS for char movement that activate when Acceleration is also zero
    
    Removed the defaulting of Replicate movement on grippable components when movement is set to server side. After second thought I would prefer the bReplicateMovement be manually set by plugin users here.
    
    08/28/2017
    
    Made "Light" versions of the RPCs that send saved movements to the server.  
    These do not pass in the RequestedVelocity and CustomVRInputVector.  
    They are called if both the RequestVelocity and CustomVRInputVectors are zero.  
    This cuts down on some of the additional overhead built into the replication in the VR characters.  
    
    Also the saved movement capsule Yaw value being sent over the network is now the same calculated Pure yaw that the GenerateOffsetToWorld  
    uses. This will make running back movements slightly faster, as well as slightly more accurate as passing  
    in just the normal HMD yaw before could yeild slightly different results when the camera is rotated off axis than  
    if calculating entirely off of the full rotator.
    
    Removed default of grippable actors base components replicating, this was an oversite.
    
    Added a new boolean to all grippable components (defaulted: off), bReplicateMovement.
    
    This emulates the variable of the same name on actors and controls whether grippables
    will replicate their movement when set to replicate (IE: so gameplay tags can replicate).
    The value of this property is overriden when the current grip type of the grippable is
    serverSideMovement, then it forces allowing movement replication.
    
    Turned bReplicates off by default on all grippable components, if you need to set interfacesettings
    on placed objects that aren't set to load with the map for the client or have replicated gameplay tags then just turn it on for the component.
    
    Better to have this directly set by the game developer than defaulted by me.
    I now have more options in the grippable components for finer grained control of them when replication is turned on.
    
    08/25/2017
    
    Fixed it so that SetReplicatedMovementMode works with Move_None now, was mistakenly using
    Move_None as the empty specifier, now using Move_Max for that.
    
    Made VRLever and ParentRelativeAttachmentComponent use failsafe axis lerp functions instead
    of just a generic FLerp.
    
    08/23/2017
    
    Fixed Simple characters overriding the RequestedVelocity of the base FSavedMovement class (fixes client side navigation with simple char).  
    
    Added a check in the VRLever to help prevent it flipping sides when over rotating.
    
    Changed the parent relative attachment component so that it sets relative space instead of world space position now.  
    World space was a holdover for when it was directly attached to the camera, not only is it not needed anymore,
    but it also can result in the incorrect behavior.
    
    Added a default lerp to the snap setting for the ParentRelativeComponent
    Can be turned off and speed can be adjusted.  
    
    08/17/2017
    
    Fixed a bug with HasGripAuthority where the server was being assigned as grip authority
    for the Client_Auth grip on its end.
    
    Added a 1 frame delay flag after teleport where grips won't check the constraint for
    if it is outside of the auto drop distance. This is to allow for the constraints localpose to
    held object to be recalculated. Otherwise it could rarely drop the held object on teleport with
    small auto drop lengths.
    
    I could manually set the constraints local pose instead, but would rather have the delay anyway.
    
    08/09/2017
    
    Some VRDial component fixes / re-implementations, should be functional now and out of
    "beta".
    
    Likely needs some additional features and clean-up in the future.
    This makes it: Button, Lever, Dial being at least initially done remaking to c++.
    
    08/02/2017
    
    New UpdateOverlaps override, should correct multiple issues / problems with how
    overlaps have been working with the VRCharacter Capsule.
    
    Some things like overlap spam on character capsule and overlap offset have been around for a long time but were mostly forgotten about.
    
    Thanks to SlimeQ for bringing them up again so I remembered to look into it.
    
    08/01/2017
    
    Added calling controller capability to the GetClosestSocketInRange interface functions.
    Can be used in overridden versions to check the hand / other info about what/who is checking
    for a socket in range. - Will require c++ changes in anything that manually implements the interface
    
    Defaults to a nullptr, but a motion controller can be passed in and used on the implementation side.
    
    Template will have it filled in.
    
    
    Made bHadRelativeMovement publically readable in blueprints
    While misnamed, is true if we collided with a wall/obstacle due to the HMDs movement in this frame (not movement components)
    
    
    Removed MotionControllerLocDelta from TickGrip
    Not only can you manually calc it (and probably should) with custom grips.
    But being in worldspace the offset could be wrong due to character movement.
    
    Better to let items calc it themselves and store the variables for more advanced use instead.
    I don't think it had much use in its current state.
    
    Now I am only calling move ignore actor if the held
    object is an entire actor. If the grip is on a component only it does not perform
    it for the entire actor, just for the held component.
    
    If for whatever reason someone needs an entire actor to be uncollidable with a component
    grip they can do it themselves.
    
    Added somewhat working dial component - needs full testing
    
    07/31/2017
    
    Replaced some overzealous uses of FORCEINLINE with inline instead. One instance in particular was causing some massive stalling when
    UBT was compiling the precompiled headers for some reason.
    
    Thanks to: Makoto Nokata
    For taking the time to run down what was causing UBT to stall during initial precompiled headers compilation in engine.
    This commit should significantly speed up initial compilation.
    
    
    VRLeverComponent is now fully functional, still would like to clean up angle calculation
    some and reduce overhead on it but it is usable in its current state so i'm pushing it live.
    Further optimizations and features will be added over time to it now.
    
    (this component took longer than expected due to REALLY wanting perfection for the most part).
    
    07/09/2017
    
    initial setup of lever component, working on physics side of it.
    
    Combined axis enums from button and lever components into EVRInteractibleAxis
    Couldn't find a generic public XYZ enum in engine already to use.
    
    *Note c++ lever component is still unfinished in this update*
    
    Added an OverridePrefix string intput to the FindClosestSlotInRange function.
    This more easily allows the end user to do things like controller (touch vs vive)
    or hand (Left vs Right) define custom grip sockets to a mesh.
    
    IE: Pass in VRGripPLTouch for Left Hand Touch socket.
    
    Moved secondary grip information into a seperate struct in the grip structure, not only does this allow me to add some replication specific
    additional properties to it. But it also should be more efficient to replicate as I can boolean control its replication without forcing
    NetSerializer on the main struct. It also lets me just pass the struct for notification functions.
    
    Added bIsSlotGrip to both primary and secondary grip structs, can be set when calling the grip function, useful for checking in the object later on.
    
    Made it default to set physics gripped objects Center Of Mass to the controller location for the grip.
    
    Added Option in advanced physics to turn off setting COM to grip location
    
    06/20/2017
    
    Added advanced physics settings for the interface, by default they are turned off
    however when turned on they can be used to change constraint settings beyond the normal
    acceleration based with stiffness/damping for angular being auto calculated.
    
    One use would be to change it from an Acceleration based constraint to a force based one.
    This would create better behavior with manipulation grips in some scenarios as well
    as offer a method of delayed / weight simulated grips (would likely need the custom
    angular stiffness and damping set then as force values for these are far higher than
    acceleration values).
    
    I have plans to add more features to the advanced settings in the future. When deactivated the
    additional grip property costs 1 bit to replicate. When activated the replication cost
    is dependent on what in it has been enabled.
    
    I have been wanting to expose the physics settings more to the user and this is probably the best
    way to do it (Like auto center of mass setting on grip). I would love to merge the normal stiffness and
    damping into the same structure but it would break many projects so it may never happen.
    
    C++ Actors/Components using the interface will need to implement the new getting function
    for the advanced physics settings (if ever merged it would replace the separate stiffness
    and damping functions instead).
    
    Now using a nearly check for better precision safety when checking for replicated changes for
    stiffness and damping.
    
    Added optional angular stiffness / damping setting to the SetGripConstraint blueprint function
    
    Added visual and editable indicators to grip interface settings that are controlled by a boolean
    (IsInteractible / UseAdvancedPhysicsSettings). To make it easier to work with them.
    
    Made some WalkingCollision override changes to be more reliable and consistent as well as use
    more custom logic and less hackish workarounds. Will need feedback on how it behaves now.
    
    New ClimbingStepUp fixes (for VR Char only ATM) appear to help a ton with
    step up issues. Adds a configurable variable to the StepUp settings that sets a seperate
    threshold for when a capsule is considered within stepup range making it significantly harder
    to accidentally fall back off backwards when stepping up. Should not be increased beyond the radius
    of the capsule (is noted as such on the variable comment).
    
    06/15/2017
    
    Fixed a missing Super:: call in PhysCustom so that the HandleCustomMovement event would
    fire for blueprint users on custom movements that are not already handled by the plugin.
    
    Expanded EVRConjoinedMovementModes enum to include 6 custom movement mode definitions
    this will make it easier to select a custom movement mode that doesn't overlap with already used
    values. This also allows SetReplicatedMovementMode to work with those 6 custom movement mode
    index's for true during movement mode switching without explicit RPCs.
    
    Changed the auto step up for climbing to call SetReplicatedMovementMode now instead of
    directly changing movement mode, this allows it to still function if the server rolls
    back a move and replays (previously in rare cases it was hanging on climbing as the rollback replay
    wasn't re-setting the out of climbing mode).
    
    06/14/2017
    
    Added pipeline for replicated movement mode changes that tie in with fSavedMovements
    Does not currently support Custom MovementModes outside of the ones I define.
    SetReplicatedMovementMode()
    
    To get it working correctly with up to 16 total values the Flag_Custom_0 and Flag_Custom_1
    and Flag_Reserved_1 and Flag_Reserved_2 of the saved movement have been taken up. There is room
    for 6 more custom modes to be added to the plugin at a later date.
    
    Added Alpha LowGravMovementMode
    
    Set StepUp to be overriden now that it is supported.
    
    Added EVRConjoinedMovementModes enum that combines the default modes with my custom ones.
    
    Added PostClimbingMovementMode property to climbing settings to set the auto step up
    movement mode switch.
    
    Added boolean SetDefaultPostClimbMovementOnStepUp defaulted to true, if true then
    will auto switch movement mode to the PostClimbingMovementMode value on the auto step up.
    If false the movement mode will need to be manually set instead when OnClimbingStepUp event is called.
    
    Added VRLowGravWallFrictionScale that modifies the speed that you retain when hitting a wall
    in low grav mode, defaulted to 1.0f.
    
    Added VRLowGravIngoresDefaultFluidFriction boolean defaulted to true, when true the low grav
    movement mode will ignore the default Air Fluid Friction that the engine uses. This allows
    low grav to work correctly without changing the default fluid friction, it will still use
    custom fluid frictions otherwise.
    
    Moved inline functions into header for root component to prevent a packaging error
    without removing inlining on them.
    
    Set step up capsule directional influence to only be used with walking movement
    in step up as it does not function with LowGrav / Flying correctly.
    
    Added capsule directional movement influence to VRClimbingStepup for VRCharacter
    
    Set VRClimbingStepUpMultiplier to default of 1.0 now
    
    Fixed step up height issue from today.
    
    06/12/2017
    
    Added prelim support for replicating capsule half heights in multiplayer.
    This is controllable by a new boolean VRReplicateCapsuleHeight on the character
    movement component.
    
    It causes minor issues with climbing step up and edge cases currently.
    
    Also now zeroing ALL Z values for HMD relative movement for the movement system.
    Before I was only doing it for the simple character.
    
    This free's up the Z axis value to be used for the capsule half height replication
    so that I don't have to pass any more variables on.
    
    06/11/2017
    
    Added "AddSceneComponentByClass" blueprint node to the VRfunctionlibrary.
    
    Made switching collision types for a grip not call OnGrip again.
    
    06/01/2017
    
    Added GetVRDevice_Matrix34Property function to the OpenVR Library, returns them as FTransforms.
    
    
    Changed GetClosestSlotInRange to check for snap range off of relative location for the snap distance
    instead of worldspace. This way snapping ranges should be object relative regardless of scale.
    
    GetClosestSlotInRange is now returning a worldtransform with an identity scale instead of the default
    which contains the actor scale. This way when made relative to the object the transform will
    be correct regardless of scaling.
    
    Physics simulating objects now are manually scaled if Scaling_Retain secondary grip type
    is defined in their VRGripInterface, this brings them to par with non simulating objects.
    Since simulating objects are not directly moved, but rather constrained to a kinematic object
    it was nessecary to manually rescale them seperately if the grip called for it. Current implementation
    may be streamlined in the future.
    
    **TEMPLATE BUT RELEVANT**
    Template Gun logic for snap point location check modified to support the fact that if
    scaled now it will have a modified relative location. (Need to consider whether to support
    direct grip storage of slotted grip or to continue leaving it up to users). Original logic
    will continue to function for 1:1 scaled objects, but up/downscaled objects would need to
    adjust.
    
    If I add direct support for "was slot" I would have to add the name of the slot as well for identification.
    
    I don't really want to bloat the grip structures or interface structures any more than they already are.
    
    05/31/2017
    
    OpenVRCleanup pass
    
    Consolidated VRDeviceProperty functions (removed separate controller specific function)
    
    Property getting function now return execution Success or Failure instead of boolean
    
    Now each property getting function includes all types
    
    Added HMD properties
    
    Updated property list to new/current SteamVR values
    
    HMD properties are prefixed with HMD
    
    Controller properties are prefixed with Controller
    
    05/25/2017
    Set default MinNetUpdateFrequency values for all relevant in objects.
    
    This was required due to Net.UseAdaptiveNetUpdateFrequency being defaulted to true
    now in 4.16.
    
    Users will want to be sure to set these for their actors that do not derive
    from grippable ACTORS (components need their parent actor to set this)
    or turn off the CVAR.
    
    Defaulting to adaptive net updates being true in 4.16, it means that with default settings replicating actors and actor components can end up in the situation where they can fall behind up to 500ms before they actually update after
    a property change.
    
    TL;DR, SET MinNetUpdateFrequency above the default of 2 now on all of your actors that have bReplicateMovement or ANY time sensitive replications involved in them (or ForceNetUpdate on changing those).
    
    05/18/2017
    
    Made auto drops plugin wide call DropObjectByInterface instead of just drop object.
    
    Local only grips now replicated to non owning clients to take the workload off of the users.
    Client still has total authority over the initial grip so it is instant. Secondary grips and drops
    are also auto replicated to the server and then down to non owning clients.
    
    Other custom changes like offsets and grip types will have to be manually handled for Client_Authority
    (local) grips still.
    
    Renamed LocalOnly_Not_Replicated movement type to ClientSide_Authoritive
    
    
    Added gameplay tag interface and a gameplay tag container to each grippable component/actor, allows for extremely
    flexible object management without enforcing gameplay systems. Used in the example template
    for defining if an object drops with specific buttons and a few other things. Is an
    optional feature, you don't have to use them if you don't want.
    
    Now that gameplay tags are an official part of the engine they should be first class
    citizens in the plugin.
    
    Made Gameplay tags on grippable objects replicate with the bRepGripSettingsAndGameplayTags boolean
    
    
    Removed the ObjectType function/variable from the VRGripInterface, close to useless when
    compared to the gameplay tags, I don't know if anyone was using it anyway.
    
    
    Fixed a packaging error with the make / break functions for the Transform_NetQuantize struct.
    
    Added Blueprint make/break and conversion functions for the new FTransform_NetQuantize struct
    
    Added some utility functions GetGrippedObjects, HasGrippedObjects
    
    Now clamping secondary grip lerps
    
    05/15/2017
    
    Moved more of the FSavedMove logic into the base FSavedMove of BaseVRCharacterMovementComponent
    
    Corrected an issue where step up functions were not correctly re-winding failed stepup attempts
    causing stuttering and jitter on step up attempts in multiplayer and solo at times.
    
    Now using a more correct movement rewind for when the server sends location corrections to the clients
    in VR.
    
    Now rounding climbing movement to 2 decimal precision in multiplayer so that it matches
    the resolution that is sent to the server.
    
    Now using a custom quantized FTransform for the grip transforms over network.
    This transform is only 2 decimal precision so in the blueprint when checking for
    the slot grip location I am now only checking up to 2 decimals of precision for a match
    
    I would like to start doing the interaction settings as a quantized value as well but it was clearing
    stored values in the editor and I didn't want to ruin peoples currently working setups.
    
    05/12/2017
    
    Removed custom NetSerialize functions on all structs except for the ReplicatedPos
    struct (as that changes every send anyway and needs to full rep).
    
    I was unaware that setting a custom NetSerialize prevented the delta serialization of
    structs from working. After network profiling however this appears to be the case, I had assumed
    that NetSerialize covered initial and full serialization only.
    
    Re-worked how the OnRep of the gripped array's detects significant changes to
    a grip that require re-initilization. Now that delta is working again the
    previous array value that gets passed in is of the previous delta, not the previous array.
    
    Because of this I had to move to caching important values and cross checking them with the new
    replicated values instead.
    
    Set all grippable components back to the default of bReplicates = false. On these
    the VRGripInterfaceSettings will not replicate unless you set the component to replicate. This
    makes more sense, and the grippable actors themselves which default to bReplicates = true
    auto replicate their VRGripInterfaceSettings.
    
    Set position and rotation to not replicate on the VRCamera and GripMotionControllers unless
    either has changed. This doesn't do much when in VR as they pretty much always change. However
    when testing with FPS pawns this is a bandwidth savings.
    
    05/11/2017
    
    Made all grippables replicate their grip settings by default now with
    an optional boolean to turn it off.
    
    
    Tested new scaling grips in a network enviroment (mostly functional).
    
    05/10/2017
    
    Changed VRGripInterface events to better allow for c++ overrides
    (from BlueprintImplementableEvent to BlueprintNativeEvent)
    
    
    Changed secondary grip bAllowSecondaryGrip into an enum with different types (WILL REQUIRE BP CHANGES)
    + SG_None, // No secondary grips
    + SG_Free, // Can secondary grip anywhere
    + SG_SlotOnly, // Can only secondary grip at a slot
    + SG_FreeWithScaling, // With scaling
    + SG_SlotOnlyWithScaling // With scaling
    
    Added prelim secondary grips with scaling (needs more work, but functional).
    
    SlotOnly and Free types are for the users convienance for checking prior to
    calling AddSecondaryGrip. (VRTemplate updated to do this).
    
    
    Changed the build.cs to place a lot more of the Dependancy modules into
    private includes instead of public.
    
    
    Added a VRLogComponent, can be used to render to texture either the console
    or the ouput log so that they can be visible and useable in VR.
    
    Also contains functions for passing keyboard and command input into the console
    without a keyboard (Template now has an example of this component).
    
    04/26/2017
    
    Pushed a new branch for 4.16 Alpha to the plugin repository and updated the example template to 4.16 preview 1.
    
    04/25/2017
    
    Finished Replication overhaul for motion controllers / camera. Now has two selectable levels of
    quantization at the cost a 1 bit due to replicating which option is selected.
    
    Default quant level is rounded to 2 Decimals.
    
    Added VRAIController, can be the base of an AI controller for a pawn. Overrides the Line of Sight To and GetActorFocalPoint functions so that
    if it is acting on a VRBaseCharacter it will use the HMD offset location instead of root.
    
    04/19/2017
    
    Using override CallServerMove now instead of custom function
    
    New grip type Beta InteractiveHybridGripWithPhysics (when not colliding this grip makes the constraint stiffness 10x what the setting is so the object matches the hand more closely)
    
    Moved some magic numbers up into const static variables in motion controller component
    
    Some bWalkingCollisionOverride fixes, needed to manually check for walking movement mode to ensure
    that it can't run during falling and the like. Removed checking for it in floor find function.
    
    Fixed having actor grips stop simulation on ALL components during grip with physics only.
    Should only stop simulating the root comp now.
    
    Made the notify grip and notify drop functions slightly more performant (can be even better but low priority)
    
    Added ability to set a grips Stiffness and Damping after grip.
    
    Fixed server sided navigation, client side was overwriting it.
    (Still think client side is way to go for VR).
    
    Removed extra code in GripNotify function now that is has been cleaned up.
    
    Added some explanation to the LocalOnly_Not_Replicated grip replication mode.
    Both in comments in source and on the wiki.
    
    04/17/2017
    
    Final refactor push before 4.16
    
    Added GoogleVR to HMD Types in GetHMDType to keep sync with Epics
    
    Finally was able to convert OpenVRExpansionFunctionLibrary to a blueprint library only now
    that it is in its own module. Uses a static OpenVRGenericInterface just like SteamVRHMD.
    
    *WILL REQUIRE BP NODE CHANGES: Due to not being a component anymore all Expansion library nodes will need to be replaced with the same node again
    but without the parent calling component.
    
    Added more notes for incoming 4.16 upgrade (Plugin should be good to go day1 of 4.16).
    
    Added SteamVRKeyboardComponent that allows for displaying, interacting with, and getting
    data back from the SteamVR Keyboard while in game. Positions itself with the component
    wherever it is and polls the events from the keyboard through an overlay it creates to host it.
    
    Is a little finicky due to the keyboard eating controller inputs and displaying the other steam overlay objects.
    But is a nice tool at the very least for dev work.
    
    Component has several events that can be Binded to in Blueprint and the OpenVRKeyboard and CloseVRKeyboard
    functions.
    
    
    04/13/2017
    
    Finally got around to fixing the coordinate system for the OpenVR render models
    
    They switched from a standard RightHanded to a backwards RightHanded awhile ago
    and I just rotated the mesh and waited to see if they would ever go back.
    
    Its been months and they haven't reverted (I forgot) so I just fixed the code and un rotated
    the procedural meshes in the template now.
    
    Also I am now pre-reserving vertice/indice/uv buffers now to help speed up extraction a bit.
    
    04/12/2017
    
    Added 7 new tracking index's to the SteamVR Tracking Index Enum.
    
    Exposed bOffsetByHMD to blueprint. Offsets the controllers by the HMDs relative location in the actor, this is useful for if
    you are doing a setup like the SimpleVRCharacter.
    
    Defaulted bOffsetByHMD to false in motion controllers so people directly using them won't have the wrong setting on default.
    
    Added a new blueprint node to the VRExpansionLibrary
    
    * RotateAroundPivot
    Takes an input location / rotation / pivot offset / DeltaRotationRequested
    Returns the new location / rotation to use that provides that delta rotation around the given pivot.
    
    04/10/2017
    
    Made secondary attachments support component grips as well now.
    
    No longer takes an actor, now takes a UObject. (Long overdue change on my backlog list)
    
    Started uploading fully built binary packages of the plugin to this thread.
    
    The Large PCH removal / switch over to Include-What-You-Use (IWYU), no longer uses PCH files, follows the engines brand new IWYU compilation / linkage as of 4.15.
    Should improve compilation times.
    
    04/07/2017
    
    Fixes a bWalkingCollisionOverride bug that cropped up in 4.15 where the floor finding function
    was ignoring it when the character started the frame in penetration. Did not show up on BSP so I didn't notice it before.
    
    Fixes the GripSteamVRTrackedComponent, a new steamvr software update had broke it again.
    
    Now uses the new incoming 4.16 motion controller late update procedure.
    
    Moved all referenced CVARs to right before they are used to stick to engine best practices.
    
    04/06/2017
    
    Added preprocessor definitions to the plugin modules (in build.cs) so c++ can control
    different code paths depending on if they are enabled or not.
    
    Added bIgnoreSimulatingComponentsInFloorCheck variable
    to the base movement component. When true simulating components
    are never considered for floor checks (to avoid instability / physics issues).
    
    This adds parity for this feature to the simpleCharacter, it was
    vrCharacter specific before. It also allows for it to be toggled off if wanted (was always on before).
    
    Added flex note for users of it to build.cs (uncomment to enable FLEX in the Flex engine branch)
    
    Removed a couple of redundent dependancy modules
    
    03/30/2017
    
    Linked OpenVRExpansion module directly into VRExpansion to avoid code duplication
    and allow for cross module class children.
    
    Added a probably temporary child class to GripMotionComponent "OpenVRTrackedDeviceComponent".
    Until epic stops checking for left/right hand index or creates a new tracked controller class, the default motion controller
    will not work with the VivePuck after a recent firmware update that changes it to a tracked device/other instead of a motion
    controller in the OpenVR system. - A child class to UGripMotionController was chosen in order to keep all OpenVR
    specific code in the OpenVR module. Required opening up the PollControllerState function as public (could have been protected
    but might be useful) and virtual.
    
    Removed all direct instances of including Engine.h and replaced with the relevant direct header includes.
    Should improve compile times across the board.
    
    Added interface for getting handles to OpenVR HMD cameras and getting the frame buffer from them into a Texture2D.
    
    Added GetGripByObject node, an obvious node after transitioning to all UObject base for the plugin that was forgotton about.
    Should eventually remove the GetGripByActor and GetGripByComponent nodes.
    
    Split manipulation grip into a With Wrist Twist and Without Wrist Twist version types.
    
    Default no longer has the wrist twisting drive.
    
    
    03/26/2017
    
    Added rolling average and exponential low pass filter nodes to the plugin for quick use when wanting to smooth values from
    things like HMD and controller movements.
    
    Added new component to the template "VRStereoWidgetComponent", acts like a standard widget component except when in VR will render the widget to a stereo layer instead of the world.
    Probably needs a lot of testing (mostly since I don't have oculus hardware anymore) and will need some cleanup, however the basic world space version of it works.
    
    Sadly OpenVR stereo layers don't support world depth and occlusion, Oculus ones may work correctly with this setting but I am unable to test.
    
    03/20/2017
    
    Added some missing headers to the VRBaseCharacter that were missed in the big refactor.
    
    Added static names for the base character default components for easier overriding.
    
    Corrected an unclosed #def in VrRootComponent
    
    Started work on The VRStereoWidgetComponent (thanks Mitch for the idea/ general concept). Buggy mess WIP, don't touch yet.
    
    Added source files from the plugin to the templates blank c++ class to help auto debug missing headers in the plugin for the future.
    
    03/13/2017
    
    Added new check for destructible components being fractured, not entirely sure that I should even be doing this.
    In the future I may force the end user to properly clean up destructible meshes instead by dropping them or attaching them to
    a root component that is gripped instead.
    
    Currently auto drops the held component when it detects fracturing
    
    03/10/2017
    
    Added crouch capability to the VR characters, suggest not using for when possessed with a HMD, but allows for
    when possessed by a different controller to work.
    
    SimpleVRcharacter always had working crouch, this fixes it for the VRCharacter.
    
    Last possible interaction that needs testing is swimming.
    
    03/06/2017
    
    Changed VRExpansionPlugin to be two seperate modules, one for all platforms, and one for OpenVR
    
    The OpenVRExpansion module just has additional functions that are OpenVR specific.
    
    This way if you want to publish to Oculus Home you can turn off the OpenVR plugin and it shouldn't package out the SteamVR binaries anymore.
    
    This WILL require replacing the VRExpansionLibrary Actor component with an OpenVRExpansion Actor Component if you were using one. Decoupling the
    standard VR library from OpenVR lets it be just a blueprint library, due to the current version of steam in the engine however the OpenVRExpansionLibrary
    still has to be an actor component to allow for correctly loading / unloading OpenVR across its lifetime (has to manually load DLLs).
    
    02/21/2017
    
    FBPGripInteractionSettings struct now manually NetSerializes the bitfield booleans as a packed byte, saving 7 bytes on replication.
    (I do not NetQuantitize the FVectors and FRotators in this struct as there may be a case where someone wants the full precision for these).
    
    Grippable actors / components still do not default to replicating this structure, as in some cases it is useful to have it client sided.
    
    Added a wall sliding scaler variable the the VRBaseMovementComponent, it multiples the wall sliding effect by this float scaler when colliding with geometry.
    In VR it is significantly more dissociating to have the back and forth seesaw slide that the default movement component creates when impacting directly into a wall.
    Should this variable prove to not be good enough I may just re-write the slide function entirely, but so far it feels a lot better with values of 0.5 - 0.1.
    
    Added a non server authority MinimumAreaRectangle (NonAuthorityMinimumAreaRectangle) node to the ExpansionLibrary. I can't think of why this is a server sided
    node on Epics end but its useful for their teleport system and breaks it in multiplayer otherwise.
    
    02/14/2017
    
    Added IsHeld and SetHeld to VRGripInterface, the plugin automatically calls SetHeld in the NotifyGrip function to send the gripping controller and boolean IsHeld
    to the interface implementing actor. This is most useful when there are multiple characters to quickly check if an interface object is already gripped.
    
    Added IsHeld and HoldingController variables to the VRGripInterfaceProperties structure.
    
    All pre-made grippable actors / components fill out the new IsHeld and HoldingController variables.
    
    02/10/2017
    
    Fixed Important bug in DropGrip with the optional velocity variables and their order of use
    
    Added naive Lerped smoothing to motion controller replication, bSmoothReplicatedMotion controls it,
    should not be used if the expected FPS frame time is smaller or equal to the motion controllers update rate.
    
    Added bReplicateWithoutTracking to use for FPS or testing characters to allow replicating custom controller movements.
    
    Added climbing movement toggle directly into Movement Component, now is injected into FSavedMove and replicated with stored movements
    this should remove any hitching when moving between climbing or non climbing movement modes as a client.
    
    Removed FBPReplicatedTransform's use of a packed BYTE for replicating controller ROLL, was not accurate enough. Now uses a packed SHORT just like the other two axis's
    
    Added an Unpack() function to FBPReplicatedTransform, used to pre-unpack location / rotation so the new lerp is less CPU costly
    (at the cost of a FVector / FRotator extra per motion controller in memory).
    
    02/07/2017
    
    Made base characters and base movement components hold more of the logic for the VR characters
    
    This change allows blueprint characters to be abstract between VRChar and SimpleVRChar and switch between the two (so that I don't have to duplicate nodes and code
    between the two base classes).
    
    It also causes less code duplication and clarifies class roles more.
    
    This change moves the VRForwardVector / Right / Location functions into the character itself for the VRCharacter, like the simple character already had it.
    
    
    01/30/2017
    Added AddCustomReplicatedMovement node to the character movement components, this adds a vector that will be processed during the next CharacterMovementComponent tick and apply as an actor offset (swept movement) and is replicated with the movement sub steps. I had this as a velocity injection but that ended up unsuitable for climbing due to rubberbanding, I may extend this in the future due to swept movement not handling floor detection on its own.
    
    Fixed a name conflict that was caused while implementing the above
    
    Fixed a random bug that I can't remember anymore......long weekend.
    
    01/16/2017
    Fixed Auto drop issue with constraints ignoring actor scale (fixes a reported autodrop bug)
    
    Master branch is now open to pull requests (this being off was an oversight on my part)
    
    01/12/2017
    Fixed an issue where damping/stiffness were not replicating for manipulation grips.
    
    Set stiffness/damping to always replicate so that they can be used as additional inputs for custom usage.
    
    Now detecting if a grips CollisionType or Replication state has been changed on array replication and re-gripping on client side
    (fixes instant drop/grip situations not being registered client side, also allows for the following).
    
    Added SetGripCollisionType node to blueprints to dynamically change which collision type a grip is using.
    (Should be called server side in network environments).
    
    01/10/2017
    
    Added in auto deletion of physics handles for pending kill objects,
    ensured that grips are removed on pending kill objects.
    
    Still better to manually Drop() an object prior to deleting it. This is a failsafe.
    
    01/08/2017
    
    Updated to new branch code
    
    Added local only grips that execute only on the client calling them (do not replicate objects using this grip)
    
    Removed actor/component seperation in grips and made it all work off of single uobject base
    
    (this change lowers replication cost and makes the plugin more generic).
    Latest informational video


    Incomplete List Of Example Template Features
    Code:
    Interactive examples of doors, drawers, levers, buttons, dials.
    
    Climbing system implemented for preview using custom climbing / movement mode.
    
    Multiple locomotion examples including: Sliding with head/controller orientation, Running In place, Armswing, Teleport, Navigation, OutOfBody Navigation, Climbing. All multiplayer compatible.
    
    Example of setting up the grip system in a generic way using the VRGrip Interface and Gameplay Tags so that adding new VR Interactibles is as easy as drag/drop and editing settings.
    
    Basic server browser example using 3d Widgets.
    Incomplete List Of Plugin Features
    Code:
    Built-In Multiplayer support with custom replicating controllers / cameras / grips and the full replication capabilities of the engines base character
    
    Physics based grips that interact with the environment and do not clip through objects, as well as manipulation grips to interact with physics levers, doors, ect
    
    Climbing/Custom movement mode fully replicated with normal movement in engine, could be used for more than climbing (zip lines, directed movement, anything you can think of).
    
    2 Different base Character classes, VRCharacter for full bore total VR re-write of a character, and SimpleVRCharacter for a stable simple overhaul.
    
    Full world collision by default, follows collision channels in engine like normal, in the VRCharacter there is also the bWalkingCollisionOverride that is
    settable in order to allow free walking through objects but collision during artificial locomotion.
    
    AI Controller that can be applied to AI to correctly target VR characters.
    
    4 different network grip replication types from fully client side, to client side server authoritative to server sided only.
    
    Waist / Body approximation component so you can easily create inventories and bodies.
    
    Vive tracker support for waist / objects with late updates.
    
    9 Different grip types each with its own uses.
    
    Secondary grip support (two handed interactions) with optional lerp in / out and scaling.
    
    Full late update control with 5 different settings for when late updates are applied.
    
    VRGrip Interface - Interface with many callbacks to provide grip information, nativley supported in the plugin.
    
    VRGrippableObjects - Most relevant actors and components, pre-overriden in c++ with the grip interface, gameplay tags interface, and
    a structure to hold VRGripInterface options in them. Drop into the scene, set some booleans and enums, and play in VR.
    
    VRExpansionFunctionLibrary - Many many useful functions for VR, too many to list here
    
    Stereo widget support for UMG menus in stereo layers
    
    VR Log component for rendering Outputlog and console to textures for use in VR
    Open VR Features (seperate module that can be turned off)
    Code:
    SteamVRKeyboard support
    HMD Camera access and render to texture support.
    OpenVR Render models / custom skins support.
    OpenVR device property support
    OpenVR function library - Too many functions to list here
    Last edited by mordentral; 10-21-2017, 07:41 PM.


    Consider supporting me on patreon

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

  • #2
    Fantastic! That replication is going to make life so much easier for me.
    Gonna have to download it and give it a try!

    Comment


    • #3
      Awesome work, this looks great!

      [MENTION=4285]mordentral[/MENTION] - If I wanted to use Mitch's template for the pickup system, do you think I'd be able to just replace the Attach calls with your Grip function (e.g., would replication still work there?)? I found the system in the SteamVR template that uses the GripMC to be a little cryptic in terms of being able to easily extend it and implement different sorts of items.

      ---------

      As an aside, I still think it would be beneficial to change how the Lock to HMD functionality works so that it would move the *actor* itself, rather than just components attached to the camera. I looked into it and it seems like that could be done by just recalculating the camera's matrix relative to the new actor matrix and then setting it on the actor where it currently does the component-move.

      I still think only moving the components could eventually cause gameplay problems (especially in cases of larger levels, multiplayer etc.), and have seen a few posts to that effect.
      Last edited by n00854180t; 07-12-2016, 06:56 PM.
      Storyteller - An immersive VR audiobook player

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

      Comment


      • #4
        Originally posted by n00854180t View Post
        Awesome work, this looks great!

        [MENTION=4285]mordentral[/MENTION] - If I wanted to use Mitch's template for the pickup system, do you think I'd be able to just replace the Attach calls with your Grip function (e.g., would replication still work there?)? I found the system in the SteamVR template that uses the GripMC to be a little cryptic in terms of being able to easily extend it and implement different sorts of items.
        Yeah it shouldn't be a problem, you'd have to keep in mind that Mitch's examples use attached simulating components with max Damping to keep them relative to the controller (if interactive), this plugin uses the sweeping functions to move items manually relative to the controller instead (and sends their components to the late update function). So there would have to be "some" changes, the plugin forces simulation off when gripping an actor so a bunch of nodes could / should be skipped from his example if using the grip function. I was considering implementing AttachTo as well as an option but after playing with it I didn't like how it worked so I scrapped my plans to support it.

        In my demo project I run all of the "Character has this in his left/right hand, drop this if he picks up that, ect ect" logic in BP and just call Grip/Drop in the plugin on what I decided to do from the server. It is game logic agnostic and just handles holding and dropping and triggering OnHit events.

        The steamVR template is very WIP and I get the idea that proteus is lacking in free time at the moment. The basics of gripping an object with my plugin is fairly simple, there is a write up on the motion controller wiki page with the basics and some best practices. I would have used Epics "World/Relative/Snap" enum like in attachment but passing in actual transforms has more total flexibility.

        wiki/VRGrippableMotionController

        *Note* Attachment is already replicated by default in the engine, when you attach a component it turns off replicating movement from the server and the clients handle it from then on out (until detached). That is one of the reasons why it doesn't sweep hit events on attached actors. You don't actually have to use the grip functions at all if you don't want to, they are just my preferred way of doing it.

        I may add back in having the server manually sweep actors attached to the controllers so that OnHit events still trigger, it was originally something I had it doing but removed it when I went over to only using the grip functions.

        Originally posted by n00854180t View Post
        ---------
        As an aside, I still think it would be beneficial to change how the Lock to HMD functionality works so that it would move the *actor* itself, rather than just components attached to the camera. I looked into it and it seems like that could be done by just recalculating the camera's matrix relative to the new actor matrix and then setting it on the actor where it currently does the component-move.

        I still think only moving the components could eventually cause gameplay problems (especially in cases of larger levels, multiplayer etc.), and have seen a few posts to that effect.
        It wouldn't be that difficult to create a custom pawn that samples the HMD position instead of the camera and offsets its location by the difference from the last sample point.

        The thing is that OpenVR returns the HMD location in relative space to the tracking volume you have set up so using the camera in relative space to the chaperone in the engine is a very clean solution to it as the pawn can act as the tracking space (that you move with teleport / other movement inputs) and the components as the relative location within that tracking space, you are essentially moving around the tracking volume with you.

        Do you have any quotes/links about the concerns? As I said it wouldn't be hard to implement I just don't see the point in doing so, but I would like to read about any issues that the current method presents as if they are significant enough I would have to reconsider LockToHMD. I haven't been able to think of anything that would be a problem for me so far and also haven't run into any issues with the default setup. You aren't moving component farther from the pawn itself than the size of the tracking volume in the default setup.
        Last edited by mordentral; 07-12-2016, 09:45 PM.


        Consider supporting me on patreon

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

        Comment


        • #5
          Originally posted by lambomang View Post
          Fantastic! That replication is going to make life so much easier for me.
          Gonna have to download it and give it a try!
          I'm looking into smoothing replication at lower update rates by the way. I'll need to test of bunch of different rates and try some lerp/prediction tests to see what feels best and where it actually becomes a problem first. The default 100htz (matching pawn default) rate didn't need any smoothing that I could see so I left it out to get it out the door but I could see needing to add it in for 30htz or so (though it is only a per client network load and isn't that heavy).


          Consider supporting me on patreon

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

          Comment


          • #6
            Hey Mordentral. Thanks for putting in the effort to make this awesome plugin! It really helps with jumping straight into VR and building stuff. I've been using your VRGrip plugin for about a month now. It helped a lot, but I have run into some issues.

            Migrating to VR Expansion Plugin
            I'm interested in migrating from your old plugin to this one, but I'm seeing some issues trying to rip out the old one and replace it with this one. I wonder if there's something simple I'm missing. Depending on how many people used your other plugin, it might be helpful to add a How-To to the readme.

            Collision Event Bug.
            I have a SphereCollision component parented under the grip controller. I'm using the begin/end overlap events on this collision to determine which object I can pick up. I'm noticing that when the grip controller is holding an object then BOTH overlap begin and end events are triggered on every tick. The events are only triggered on the colliders close to the object, but they are triggered on every tick regardless of which controller is holding the object. That is to say, if I hold an object in my right hand, then my right collider is triggered on every tick. Then if I bring my left hand close enough to my right hand, that collider is also being triggered on ever tick - even though the right hand is holding the object.

            This rapid-fire of begin/end overlap events is causing incorrect results when I poll which objects I can pickup. If I had to guess, I'd say something about the way the plugin is updating the gripped object position is causing collision events to freak out. I noticed the wiki suggests that I use a sphere trace instead of overlap events - probably for this reason. I'll use the sphere trace for now, but performing a sphere trace every tick is probably more expensive than using overlap events.


            Better Physics Behavior
            Have you read Nick Abel's article and TomorrowTodayLabs' followup on how they solved physics-based object movement in unity? It's a really interesting read, and they put their work up as a plugin for Unity called NewtonVR. Here's a sweet video from the article of the final interaction they achieved:




            Obviously their solution won't be ideal for everyone, but I do think they address a number of areas that the sweep-to method falls short in. Namely...

            Objects get caught on floor easily.



            You can't pick up objects with another object on top.



            You can't push/pull objects, and objects have no mass.



            What do you think about trying to port some of their ideas to UE4?

            Comment


            • #7
              Originally posted by AssumptionSoup View Post
              Hey Mordentral.

              Migration
              Being a new plugin the classes technically are considered separate from their old versions, you actually have to place them back into the pawn and re-place their functions. I decided to rename it as the old name no longer suited the project but this is a sad consequence being a one time hit of placing the nodes again.

              Overlap Triggering
              I set move ignore to the controller when gripping an object, it is possible that overlap is triggering anyway as the current movement is swept location. You can either not use overlaps or set it to ignore the channel you place the overlap on after gripping (I have a special collision channel for traces / overlaps). I also don't call traces every frame, I call it on button press, but if you are looking to highlight objects to pick up I see your point. But you can always run traces on a timer set to 30-60 htz for highlighting and call the trace on button press for the actual pick up (my voxel project does this for block highlights).

              Push / Pull
              Yes you actually can, the object has to be simulating though for it to move it, i'll agree that the interaction is less than steller currently and I am going to provide a better option for real physics. The current grip is intended just for when you don't need full physics solving on the gripped object itself as it will be cheaper. It was also the fastest one out of the gate to implement so I could look at other things.

              New Grip Styles
              I fully intend to make a better grip option using physics, I originally had AttachTo set up and ran into it not being up to what I wanted from it and removed it from the grip function. Unity's solution is effectually what I am currently doing with location but done through the physics system instead so it actually slots right in. It is next on my Trello list actually to look into it now that I have decided to throw away AttachTo (spent my free time in the last day mulling over if AttachTo was worth it and trying it out).

              I don't like the visual drag latency in how they are doing it in Unity though and am pretty sure that there is a way around it by extending my current solution and using constraints (ripping from grab handles but forcing late updates and removing the lerp). I really like the interaction in say Hand Guns, Horseshoes, and Hand Grenades but don't like that the guns themselves lag behind hand movements visually (for actual shooting location they are correct so there is something to be said for that).


              TL;DR yes all of those things bug me as well and as a user of my own plugin I am fixing them. I'll move experiments to the side for now (was playing with movement options) and just implement the new grip option instead.

              The cool thing about the plugin is when the new grip is in you'll just have to select it from the grip style drop down and it should work.


              *Edit* Oh and I was looking into both hands on the same object interactions. Eventually both options should support that as well; but I will wayside it until the new grip is in too.
              Last edited by mordentral; 07-14-2016, 08:59 AM.


              Consider supporting me on patreon

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

              Comment


              • #8
                Originally posted by AssumptionSoup View Post
                Hey Mordentral.
                I actually had this done yesterday but got side tracked trying to make a hybrid system (not sure how stable I can get that one yet). It needs some going over to make sure that multiplayer works fine with the new grip style before I merge it in but I think the video is pretty much what you wanted.

                Its up to 5 grip methods now I think (6 with hybrid if it makes it), you pick what one you want per item you are picking up and how you want it to behave. When it comes out this method will have several configurable options (you probably don't notice in the video but I have the grip strength 1000x higher on my right hand than my left so it doesn't free float as much in the video).

                I'll get it pushed out to the main branch of the plugin by the end of the weekend, I was off on a tangent for awhile there experimenting with a bunch of random things (VR gets me excited) or this would have already been in.

                Cheers



                Consider supporting me on patreon

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

                Comment


                • #9
                  Migration
                  Being a new plugin the classes technically are considered separate from their old versions, you actually have to place them back into the pawn and re-place their functions. I decided to rename it as the old name no longer suited the project but this is a sad consequence being a one time hit of placing the nodes again.
                  Thanks for the help. As it turns out, I had to delete the original VRGrip components before deleting the plugin, or my game would crash on load. After deleting the components, it was okay if I still had any variables with the VRGrip type (they got reset to Object). Then I just had to put the new plugin in place and run around reconnecting everything (that was less fun). Next time around, I think I'll integrate the plugin with my game via C++ so it's easier to refactor things. Blueprints makes refactors surprisingly hard with it's propensity to disconnect nodes! And speaking of C++, I don't know if you intended the plugin to be using in C++ or not. I'm definitely a noob at both C++ and Unreal, but it looks like the plugin classes are missing the VREXPANSIONPLUGIN_API (macro? keyword?) in order to be exposed to game logic. I can send a pull request that adds this if you're interested.

                  Overlap Triggering
                  I set move ignore to the controller when gripping an object, it is possible that overlap is triggering anyway as the current movement is swept location. You can either not use overlaps or set it to ignore the channel you place the overlap on after gripping (I have a special collision channel for traces / overlaps). I also don't call traces every frame, I call it on button press, but if you are looking to highlight objects to pick up I see your point. But you can always run traces on a timer set to 30-60 htz for highlighting and call the trace on button press for the actual pick up (my voxel project does this for block highlights).
                  You're correct, I'm using it for highlighting. I forgot to mention that in my original post. I'll have to play around with running my traces on a slower frequency, that's a good idea! I'm a little worried that there will be a disconnect between the feedback the user sees and the action that occurs - but I won't know how bad it is without testing.

                  I don't like the visual drag latency in how they are doing it in Unity though and am pretty sure that there is a way around it by extending my current solution and using constraints (ripping from grab handles but forcing late updates and removing the lerp). I really like the interaction in say Hand Guns, Horseshoes, and Hand Grenades but don't like that the guns themselves lag behind hand movements visually (for actual shooting location they are correct so there is something to be said for that).
                  I totally agree. I think having really good physics interaction is worth the trade off of having some latency on gripped objects, but it's definitely not a compromise I'd like to make if I don't have to.


                  I actually had this done yesterday but got side tracked trying to make a hybrid system ...
                  Oh man, this looks super awesome!! Yeah, it looks like most of the things I was interested in. I can't wait!

                  Comment


                  • #10
                    Yeah I forgot the macro on the classes, I'll add it in to them today.


                    Consider supporting me on patreon

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

                    Comment


                    • #11
                      Merged the physics grip branch into main, it needs more play time to lock down bugs but was working for me during initial multiplayer testing (don't forget to replicate movement on physics objects so they stay sync'd). The hybrid setup "works" but needs to be finished still.


                      InteractivePhysicsGrip is the style you were looking for, it also adds two properties to the motion controllers for Stiffness and Damping when holding physics simulating objects, I may break that out into a object by object basis later.

                      There are also a few new functions and features, i'll document them tomorrow.
                      Last edited by mordentral; 07-17-2016, 10:38 PM.


                      Consider supporting me on patreon

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

                      Comment


                      • #12
                        Would any of the exposed OpenVR functions be able to return what kind of HMD is in use? Rift/Vive/OSVR. I need to change player class since the haptic events are very different on Vive vs Rift.

                        Comment


                        • #13
                          Originally posted by Fantasifall View Post
                          Would any of the exposed OpenVR functions be able to return what kind of HMD is in use? Rift/Vive/OSVR. I need to change player class since the haptic events are very different on Vive vs Rift.
                          I think someone requested of Rama to have his library include that function. It is already in GEngine so I will throw it in anyway since it makes sense and is easy, but if you don't intend to use the rest of my plugin and already use Rama's library then you should be able to find it there.

                          Regardless I'll have it in this by the end of the day (have to push out some cleanup for things anyway later).


                          *Edit* Pushed the new function early as the rest of my work today will be on a new branch

                          GetHMDType - static
                          Last edited by mordentral; 07-18-2016, 11:49 AM.


                          Consider supporting me on patreon

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

                          Comment


                          • #14
                            Oh my, this Plugin couldn't have come at a better time. Literally just spent this last weekend testing my Vive game with some friends, and one of the biggest issues was the grabbing system I had made. My solution, using merely the built in blueprint functions was to turn off gravity on grabbed components. This wasn't the ideal solution but it worked for the most part. That said it seems this plugin gives far better control and I hope to implement it.

                            Could you by chance give some insight into the setup of the "New grip style" video? I've got a line trace on the controller trigger, then checking my grabbed object and then calling grip actor from your plugin, but it seems to go a bit crazy once attached. Will have a further tinker, but this does look promising. Great work!
                            Portfolio

                            Default Interactive

                            A Skip And A Hop Too Far Into Light Speed

                            Comment


                            • #15
                              Thank you so much for the HMD type! This makes my life so much easier. However, ParentRelativeAttachmentComponent does not seem to work at all. I looked at the code and it seems like it should but all that's happening is occasionally, there will be an offset of the child component of the ParentRelativeAttachmentComponent. It just sticks at an odd rotation, and keeps following the HMD rot at that offset rotation 1 to 1. I tried with both Static and Skeletal meshes, and tried yaw values between 1-3 as well as much higher, locked on pitch and roll.

                              Comment

                              Working...
                              X