VR Expansion Plugin

  • thanks so much for the plugin. I’m jumping into it for the first time now. Is there any way to join a server using the FPS_Vive pawn? I can’t seem to activate the ‘Search’ or ‘Join’ buttons on the 3DMenu with the FPS Pawn. Thanks!

Press L for laser and left/right click on the buttons.

Ah, not sure how I missed that. Thanks so much! One more question… When I package the game and run it with Steam open, I don’t see the Steam overlay in the bottom right. I’ve checked the DefautlEngine.ini and the SteamSubsystem is enabled, so I’m not quite sure where the issue lies. It also cannot find the hosted game on my other computer. Any idea what the issue might be? Thanks again!

EDIT: It looks like the issue was that it was set to ‘Shipping’ build instead of "Development’. Good to go!

I’m having trouble figuring out how to get VOIP working. Should it just work when you talk or is there a push to speak function? Looked through the assets but couldn’t seem to find . I’m connecting through Steam which is working perfectly now, just can’t hear each other. I made sure inputs and outputs in Windows were correct and picking up signals. Any info would be awesome, thanks!

EDIT: Just got working. Found that push-to-talk was enabled by default in VR Expansion and saw in your ‘Advanced Sessions’ thread that required setting ‘Start Network Voice’ and ‘Stop Network Voice’ nodes.

Hey there! Thank you very much for your library. It’s helped me prototype rapidly and learn a lot about ue4.

I have run into an issue that I’d like to show you really quickly. I’m at a point in my code where I want to modify your library (to extend an interface and to experiment with making attachments generic), but the issue that I’m running into is that whenever I change any code in your plugin I get an error and nothing will compile.

For example, even if I add a commented out line (as seen here in sourcetree)

[ATTACH=JSON]{“data-align”:“none”,“data-size”:“full”,“data-tempid”:“temp_160817_1553818660263_296”}[/ATTACH]
https://forums.unrealengine.com/core/image/gif;base64

I get crazy error:

[ATTACH=JSON]{“data-align”:“none”,“data-size”:“full”,“data-tempid”:“temp_160818_1553818691440_452”}[/ATTACH]
https://forums.unrealengine.com/core/image/gif;base64

I am not very sure what that’s about. Removing my commented line lets everything compile just fine. I figured I should clense my project of all binaries, intermediates, derived data caches so I did that – for my project and for the individual plugins. That didn’t work.

I really do appreciate your time and thank you for reading!

Mmmm, well the images didn’t load so its kind of hard to help you debug, try hosting out of the forums (imgur) and linking them instead.

If you are trying to extend an interface though it generally is better to make an auxiliary interface specifically for new functionality, though it doesn’t hurt to extend it, the more bloat the harder it would be for you to maintain it and you can keep things more contained by splitting up functionality a bit.

Curious what you mean by attachments generic? As in like a gun attachments kind of setup or buildings blocks? If its a good idea / concept I wouldn’t mind hearing about it and helping you conceptualize.

Thanks for the quick response!

Oops! That’s weird. Here: https://imgur.com/a/JeMQXFA The first image is my file diff, just adding a commented out line The second image is the error and line that “caused” it. (skeptical ofc)

Cool thanks for that advice. That is mostly my plan.

Here’s the backstory: in my game the gun fights have become fairly “spammy” so I’m implementing a reload mechanic. I have a pretty simple prototyped interface called “Attachable”, which knows what it is attached to currently. For example a Magazine is an Attachable that knows it is attached to a hand, or a weapon, or something else. The idea is that every item should be able to “drop” itself. Items like Magazine are querying for their attachment slot, so when a mag is in a player’s hand, then it encounters the “mag slot” of a gun, it drops itself from the hand then clicks into the gun. I have it prototyped it and it looks pretty good 90% of the time. That 10% of the time things go a little bit wrong. is why i’m wanting to modify the library’s source, the bug looks like :

(Run as listen server 1 player, acting as server)

1 Magazine is held by hand, is being moved towards the gun’s mag slot
2 Magazine is close enough to the sweet spot of the mag slot & it wants to lock to the gun
3 DROP magazine from hand
4 Attach magazine to gun (using AttachActorToActor, not using a constraint) then mag is moved to the correct spot relative to the gun.

5 Mag is located correctlydirectly at point
6 One tick later, the mag is moved to where the hand USED to be when it encountered the mag slot, resulting in the gun looking like it has a mag glued to its side, rather than inside the gun.

bug happens NOT all the time, but I’m still going after it for now. ANYHOW don’t worry about my bug. I’m still cautiously exploring, but was wanting to add some debugging logs and tests inside your src, thus my images.

Thank you VERY much for your quick response. I really do appreciate it. My discord is Ethin#1223 add me if that’s your jam, i’d love to see if i can contribute in anyway.

Your issue there is syncing with the drop / attachment packets, also if you run physics grips you need to delay after un-simulating to allow the physics thread to end simulation before attachment or it can cause concurrency issues where the last physics tick where the object “ends” simulation will re-position the attached object back to its original location on drop.

That is specifically why I added the DropAndSocket function, it performs both in a single RPC call so that there is no packet ordering issues, it also adds in a latent delay for the next tick to ensure that the object is reset to its correct location post attachment.

https://.bitbucket.io/VREx…ketObject.html

Without using that node you would want to add your own 1 frame delay to allow the physics simulation to truly end.
Also if you have an older plugin version I recently improved that functions reliability by checking some more simulation states.

As for that compilation error…yeah…UPrimitiveObject is a subclass of UObject, it should convert fine, and in 90% of cases it DOES just fine, but two times or so that line has thrown an error on me from UBT bugging out, one was early in 4.20 and another was in 4.18 in a preview build. I added a (redundent) cast to it a while back to ensure that it just stops throwing that error occasionally.


if (Other && GrippedObject && GrippedObject == (const UObject*)Other)

Its been in for all of 4.21 as far as I am aware, so you must be on 4.19-4.20.

Not enabled by default in the VRExpansion, just in the template project (its a config file entry), I don’t like open mic when testing with people.

As for steam not loading in shipping builds, you need to provide an AppID.txt file for shipping builds.

Thanks for the reply! So I may have jumped the gun a bit… VOIP is working but it only records quick little segments of what I’m saying. Sometimes it doesn’t seem to pick anything up at all. If I speak loudly, and quickly it picks up some of my speech. Is that some sort of sample rate issue? Also it doesn’t seem to work if I choose an alternate input for my mic. It seems to only pick up the Rift microphone, even if I’ve selected a different input in my Windows settings. Is it possible to pull sound from an alternate source? Thank you!

LOOKS GREAT! I just found the ‘sample project’ … Very exciting! VR Locomotion has always been my ‘bane’… I hope controller mapping is still customizable in the input settings panel, that would be the cherry on the sundae!
I finally have funding and will consider *if it helps, *a fair chunk of the budget and Patreon accordingly.,
I have a few thousand VR / UE4 Dev. Tube Subscribers, after I know more, I will make a Dev blog video and show it off in production!

quik questions, Do I install the VR Expansion plugin, or the Open VR Expansion plugin or both? (I work in a Rift & ‘play’ in a Samsung Odyssey…)
and how to install plugin, if you could just give me the short version… (Just pull folder into Epic Games\UE_4.21\Engine\Plugins probably?)

Now that I see the folders, it reminds me of the Allright Character Rigging Plugin install… (easier than I thought it would be :wink:
THANK YOU!

The “coming soon” parts are because the website was launched a little over a week ago, I finally buckled down to clean up the documentation and made the site for that reason. I intend to have the installation steps up next week, I wanted to get the basic overviews done first because it would be a direct help to my current userbase. The wiki itself and the installation steps, are, and have always been, both linked in the OP and in the master repository itself.

The plugin has never been geared towards engine beginners or “artists”, it was intended for people that have already started off in the engine on the programming side, are comfortable with it in general, and want to start in on more complex VR features. Plenty of developers have figured out how to use it, and plenty more will when the documentation is fleshed out more now.

Your 4.21 link is here: https://bitbucket.org//vrexppluginexample/get/default.zip
current master / default branch is always the latest engine version.

There is a very good reason I keep every on the repositories though, I can port back features and bug fixes to multiple engine versions in the past keeping it like that.

The setup instructions as they currently stand are here: https://bitbucket.org//vrexpansionplugin/wiki/How%20to%20add%20the%20plugin%20to%20a%20blueprint%20only%20project%20-%20Step%20by%20Step

Since I linked the example template, you would want to skip to Step 10.
I may actually get around to moving them to the website today though and cleaning them up, we’ll see.

Hi, I’ve seen people run into error during the last step of installation: Step 12 Build Solution. I did set it to Development Editor but I still get error

Thanks in advance

Added a new use case:

Accueil - ECLIPSE | VR MULTIPLAYER AND COLLABORATIVE ADVENTURE - A warehouse scale multiplayer game

4.22 is merged into master, 4.21 is now a seperate locked branch, 4.22 binaries have been uploaded.

4.22 Changes here for better readability: 4.22 Patch Notes – VR Expansion Plugin

Hi!

Did anything change with the VRSlider Componenent? I just updated to the new master (4fdb849) in UE4.22, and the slider’s initial position is 1 (instead of 0) and then I move it, it just disappears (or, shoots of somewhere in the distance).

Am I missing something? Or can it be a bug?

edit: I re-built the solution, created a fresh BP with only the VRSlider component, no change… Also in a clean ExampleProject the issue occurs. It seems the problem only shows when the slider component is the root of the BP.

To re-produce:

  • create a new BP,
  • add one VRSlider component and set it to root
  • on ‘Event BeginPlay’ add a node ‘Set Slider Progress’, with value 0
  • simulate in editor or VR. The component is no longer visible

Is it attached to a spline? Really nothing changed other than moving when it re-calculates its initial position out of begin play. If you are moving it post that initial period then its offset will be wrong now.

It opens up more flexibility with replication.

Edit There does seem to be some weirdness with the slider, i’ll look into it.

Also thanks for that edit, being the root component may be an issue, I never run them as root, i’ll test that case.

Thanks! I updated above post with more details to re-produce.

I used the wrong init function by mistake, i’ll swap the interactibles over to the correct one and re-upload within the hour.

Thanks for letting me know! That was outside of my test cases.

Edit Fix is live on the repo’s, I am re-building the binary packages as well.

Hey - Small issue with VOIP. It’s working but it only records quick little segments of what I’m saying. Sometimes it doesn’t seem to pick anything up at all. If I speak loudly, and quickly it picks up some of my speech. Is that some sort of sample rate issue?

I’d like to integrate movement similar to Lone Echo, where the user is in zero gravity and can add thrust to their pawn and ‘fly’ through levels. I tried messing with the Vive pawn, but experimenting with adding physics to the root causes everything to go nuts. I want to add movement without breaking all the work you’ve put into the pawn. Do you have any suggestions of how to begin implementing sort of movement? My thought was to activate physics and remove gravity but maybe I’m going about that wrong. Thanks so much.

For voip there is a voice threshold setting, you’ll have to google it as I can’t remember off the top of my head.

For the low gravity mode, set the movement mode to LowGrav with SetReplicatedMovementMode (with the normal nodes you have to define custom and then the custom number, that node packages it neatly).

It retains momentum without gravity influencing, you can boost with Add Impulse / Add Force or you can feed in CustomMovement commands like with the climbing movement mode. You can also set the PostClimbingMovementMode to LowGrav to have it seamlessly transition out from it and climbing. If you need to use it in multiplayer with rollback working correctly then if you are using addforce/impulse, you’ll want to use a Custom_MoveAction that applies it, that way it replicates correctly since those nodes do not normally replicate on engine characters.

https://i.imgur.com/YA585aB.png

And yeah, you don’t want to simulate the root component of a character when the character movement component is active.