VR Expansion Plugin

Patch notes for recent work as I take the GunTools live. Video below going over the gun tools grip script as well.

Note that the gun not lerping out of secondary grip in the video wasn’t a nativization bug, I had to fix it in the gun tools grip script before taking it live.



**Many of these changes go for 4.20 and 4.19 versions as well (except for the new gun tools, it is 4.21 only)**

Finalized beta version of GunTools Grip Script, supports pivot offsets, recoil instances, virtual mount settings, extended smoothing.

Moved smoothing settings out of default grips and into the gun tools grip script.
 will lower default grip overhead and also let me specifically fine tune
the smoothing for gunplay.

Added "WantsDenyLateUpdates" to grip scripts allowing grip scripts to deny late updates when they don't want them.

Opened up Grip Scripts to be editable per instance again instead of just in defaults.

Added remote grip pivot setting to the motion controllers, allows easier remote gripping and custom operations / mobile VR ease of use.

Fixed it so that attachment grips will now have full use of the late update settings
and features. Also moved the interface late update deny checking to the end of the logic checks
to save some perf on grips that will be denied anyway.

Also fixed it to support Custom pivot component for attachment grips

Move setting collision on to post moving capsule in seated mode
Also use teleport for movement from seated position. Fixes some collision issues exiting a physics vehicle.


Made bDenyGripping defaults visible for all interactibles.
Also made BreakDistance be ignored if value is 0.0f on all interactibles (to match
general grip settings).

Added new DeltaTeleportation, a new teleport type added to help alieviate teleporting with physics simulating skeletal bodies in hand.

Am now filling in the Component Velocity member of the GripMotionControllers.

Added OnStartedTracking and OnEndedTracking events to the motion controllers.

Added prelim OnBeginInteraction and OnEndInteraction events to the button component.
Also added the Interacting Component to the button events as it is useful in itself.

Removed IgnoreActorWhenMoving from grip inits, it was causing overlap spam as the primitive bodies
were not correctly clearing overlap passes.

Pushed a new update to both repo’s, fairly important for multiplayer users.


 
 4.21 "fixed" the bReplicateMovement issue for actors, had to comment out my old fix to play nicely with the new code  

Also some minor changes to the OpenVR Skeletal API (Knuckles) package for those using it.

Compiling new pre-packaged binaries that I will upload in a bit (OP Post will have the new date entry).

Had to fix a minor bug and also bring that replicate movement change to the pre-packaged.

Pushed a fix for seated mode to the repositories today.

I am going to start putting more of the minor updates in here since these long delays between larger change logs leave the users that are only in the forums out of the loop. I realize that a lot of my users are in the discord but I should really keep the ones that aren’t up to date as well.



 Fixed some seated mode issues  

 Am now forcing attachment on the simulated client side as well just in case.  

 Also I am clearing some movement prediction data so that the server doesn't  
 wait for a few seconds for a valid timestamp move in an old out of date range.  

 Also I am network rounding the stored location for seated mode and the stored  
 yaw for seated mode.  prevents an initial movement correction on leaving the  
 seat in some situations.


The timestamp change fixed a second or two delay on exiting where the server would wait for the wrong
time stamp from the client and then would give up and position correct them back. Now the client should be
able to leave and run away from the seat with no issues.



How do I launch the scene with all the VR examples? I’ve done the tutorial:

but it doesn’t say what to do after step 13

Those are all in the Example Plugin Template: https://bitbucket.org//vrexppluginexample

which also comes with the plugin as its needed for the example project.

Thank you! :slight_smile:

VR preview is currently grayed out though, you or anyone else know why?

Edit:
Nevermind. Got it working when I started Unreal before SteamVR.

In my multiplayer session, other players arnt able to rotate, it just snaps them back and in their logs it has the error bellow. not sure what it means though.


LogVRCharacterMovement: Not combining move [would collide at start location]

Also do i need to do anything special with custom grip scripts to get them to work properly on multiple instances of an object. If one player is using the object while others are holding it the logic in the custom script will apply to all if one person uses it.

Yeah check out the Tips&Tricks page under ClientAuthoritativeRotation

https://bitbucket.org//vrexpansionplugin/wiki/Plugin%20Tips%20&%20Information

Unless you turn on legacy mode then that snapping is because you are rotating your players outside of the MoveAction_SnapTurn and/or MoveAction_SetRotation. I made the pawn by default be server authoritative on rotation as well since we have an offset root on the standard pawn, otherwise client rollback can have some unintended consequences.

If you enable legacy mode it no longer rolls back rotation.

As for the grip script, not entirely sure what you mean by “using” vs “holding” here, you have access to the IsLocallyControlled function and HasAuthority though to filter your actions, you would have to be more specific about what you mean since those terms don’t generally go together with how grips work.

Ah right, thanks

For the grip script, its using a custom script to lock the movement axis of a pool cue when the user holds trigger if being held by both hands that are socketed thus setting the script active while the trigger is held, but it seems that the first person to use the axis lock will then cause all the other cues people are holding to activate the script.
Im very new to dealing with networking sorry.

Yeah not entirely sure what you are doing, sounds like either you are multicasting it somehow in a context where all of the characters are setting the flag, or somehow are referencing the same grip script reference in every clients stick.

is all its doing to get the reference,
Does it make a difference how the actors are spawned?. ie if they are placed in the editor apposed to being spawned with a server custom event

No it shouldn’t, though there is currently an engine bug with instanced inline-new objects where they can end up referencing the global version of an object. It appears to happen most often with grip scripts if you add one to a base class and then create a BP off of that base class.

There are a few reports in so I hope it gets fixed soon. How are you spawning them? I can dynamically spawn scripts at will and they behave independently as well as ones just placed around.

at the moment they are just dragged in through the editor, was about to try spawning them through a button press in the world to see if that made a difference.

Hi there,

Now I’ve been struggling with an error for the last 3 days and I’m getting a bit desperate… Maybe someone here has a clue what to try next.

Working on a project with the VRExpansionPlugin, I have some functions to find the PlayerStart with a correct (combination of) tags.

Everything works great in the editor, but when packaging the project I get these errors:



UATHelper: Packaging (Windows (64-bit)):   LogBlueprint: Warning: FMemberReference::ResolveMember (ActorHasTag) bSelfContext == true, but no scope supplied!
UATHelper: Packaging (Windows (64-bit)):   LogBlueprint: Warning: FMemberReference::ResolveMember (K2_FindPlayerStart) bSelfContext == true, but no scope supplied!
UATHelper: Packaging (Windows (64-bit)):   LogBlueprint: Warning: FMemberReference::ResolveMember (GetTransform) bSelfContext == true, but no scope supplied!
PackagingResults: Warning: FMemberReference::ResolveMember (ActorHasTag) bSelfContext == true, but no scope supplied!
PackagingResults: Warning: FMemberReference::ResolveMember (K2_FindPlayerStart) bSelfContext == true, but no scope supplied!
PackagingResults: Warning: FMemberReference::ResolveMember (GetTransform) bSelfContext == true, but no scope supplied!


When I play the packaged project, I’m now spawning at the correct PlayerStart.

Searching for a solution, tried the following:

  • Moved the function from PlayerController to GameMode (someone said could have an impact).
  • Moved the search out of the function, into the main event (someone said could have an impact).
  • Replaced PlayerController and GameMode with fresh copies from the VRExpansionExampleProject and re-created all custom functionality from scratch.
  • Moved the entire content of the project to a fresh copy (with a fresh compile of the latest download of the plugin).
  • Work without K2_FindPlayerStart (which looks for PlayerStartTag instead of the more general Actor Tag.
  • Write a replacement of ‘ActorHasTag’ and stop using ‘ActorHasTag’.

Nothing has made a difference - and while the number of times the above errors are generated vary depending on what functionality I use, they are always there (even if I’m no longer using ‘ActorHasTag’, for example).

Now, I do think (but I’m not sure) the problem is originating in the VRExpansionPlugin (and some version-to-version migrations I’ve made in the past), mainly because when I try to move or save a copy of the PlayerController / GameMode or PawnCharacter, I get the following message:
20190119-16_05_17VR_Player_Controller.png

is why I tried to replace the PlayerController and GameMode with fresh copies - which did in fact cause the above error to disappear (but not the warning when packaging or the missing functionality in the packaged project). Only the Pawn I did not re-write (because that would take a lot of time and it seems unlikely that the pawn can cause … also: with the pawn the above ‘Save’ error disappeared after moving to a fresh copy of the project).

So now I can’t think of anything else to try… and it’s driving me mad!

Hope that someone has ideas :slight_smile:

Try the step listed at the bottom of answerhub post: Can't save due to "Graph is linked to external private object" - C++ - Epic Developer Community Forums

Also no its not plugin related, you just appear to have some BP misslinking and/or bad redirects. You may want to try “fix up redirects” on your content folder as well.

As for the no scope supplied message, I would normally expect that in something without a valid worldcontext? But the player controller should be fine for that, where are you running logic? On login? On Spawn?

****](Interesting post from AnswerHub on how to setup a Layer Car Paint shader - Rendering - Epic Developer Community Forums) Thank you, you truly are a legend !! I’ve been playing with UE4 with VR on and off for a year now, until I found . Wow !! Wish I found it a year ago

Is it possible to prioritize a object to be gripped, having issues with trying to grab a small physics object on a table, seems to attempt to grab the table as well and requires some precision to grab the object

Yes, I don’t know if you are working from the ground up or with the template, but I expose

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “AdvancedGripSettings”)
uint8 GripPriority;

In the AdvancedSettings structure that you can get with https://.bitbucket.io/VREx…pSettings.html

in the template I use it to sort an array of trace/overlap results by the priority and then return the closest of the highest priority results. It defaults to -1 so all non interfaced objects are a priority of -1 and all interfaced objects are a priority of 0, the template gun for example has the slider on it as a priority 2 I think and so it is always picked out first if the hand is overlapping both it and the gun.

If you are based on the template you can just set the priority on the object and forget about it. But from the sounds of it you aren’t, as with the template it should already be prioritizing the interfaced object over the table.

Thanks for the input! I also found the link you provided and did not manage to solve the issue following those steps… But anyway, your mentioning BP links got me to try something else that did solve the issue of the warning messages: I migrated the involved BP’s (Game Mode, Player Controller, Pawn) to a fresh project, opened that project and migrated them straight back (overwriting the originals). That way I could save / rename the files again. After that, I saw that some old copies remained (though no longer in use). I manually deleted those and my problem went away.

Next, I found that my logic to find a PlayerStart was still as per your older example projects (Game Mode calling a custom event ‘Initiate Play’ in the PlayerController). somehow did not allow my logic (going through all PlayerStarts and selecting some based on generic Actor tags, a function called in ReturnHMDStatus on server) to execute correctly. Moving to a more regular setup (as per your latest example project, with logic called through EventBeginPlay in the PlayerController) solved issue.

… I’m probably still not doing things in the best way… but it’s really hard to find good best practices for stuff…

Anyway, just wanted to write down the solution I found hoping it might help someone else.

And of course thank you for your message which, in the end, pointed me in the right direction.

W