VR Expansion Plugin

I have an issue with the advanced sessions plug in where no one can find a created server over Steam.
everything works fine locally in 5.5.1.
I have assured that my app ID is applied in the correct files engine.ini and steam_appid.txt.

I’m not sure what else can be done to fix the issue.

Hi there, I have an issue trying to launch the VRexpExemple my headset is tracked but not my controllers.
My setup is Windows with meta air link and an oculus 3. Does anyone had this issue and know how to fix it ?

LogNetPlayerMovement: Warning: CreateSavedMove: Hit limit of 96 saved moves (timing out or very bad ping?)… Anyone notice this issue?

That happens when the character movement component cant get acknowledged moves fast enough to keep up with the send rate. Either you are testing with something like 1000 ping, or you have a lot of movement corrections going on.

VRExpPluginExample could not be compiled. Try rebuilding from source manually.
what should I do?

The example has to be built in visual studio, the website has a tutorial on doing so starting from step 6 here: VR Expansion Plugin Documentation – VR Expansion Plugin

Is it possible, use VR Expansion Plugin in UE with Oculus Quest 3 and enabled MetaXR plugin? Mostly interested in multiplayer part. I mean maybe some conflict occurs?
In project settings I choose XR API “Oculus OVRPlugin + OpenXR backend” option.
изображение

No conflict, VRE uses whatever runtime is active. I will say that oculus hybrid mode there does not behave like actual native OpenXR though so tracking and stuff won’t be the same and you have to account for the offsets.

Someday they are supposed to fully support native openXR and that will hopefully no longer be an issue, I know the hybrid mode people use for some specific features not available in native openXR.

Hi, I am having some issues building it from source, any chance to get it as a release in Github like it used to be available?

Thanks.

? It has a github branch for every single engine version. If you mean precompiled binary releases, they are on vreue4.com under binaries in the menu

Perfect, that’s what I meant! Thank you very much!

@mordentral how can I slow down the controllers’ movement?
now the hand movement is 1 to 1 with the controller.
I want to slow down the movement of the barrel when I grab the weapon with my other hand. So that it would be harder to control the recoil (to apply more effort).

the smoothing system from gun tools, as it seemed to me, is not suitable. I need to move and turn sharply so that the control of the second hand is slowed down.

There is front hand smoothing on the guntools which is a seperate latency added to the front hand, though I think the default is 1Euro which won’t have the drag you are looking for unless you play with the variables, its specifically intended to keep snappy movements but remove micro adjustments. You can use a customized guntools or overlay grip script to slow it down and blend it if you want.

@mordentral
I hope it’s okay to ask a related question in this thread since it’s been going on for this long.

I am using VRExpansionPlugin for a C++ implementation of an industry based scenario in which VR and desktop controlled characters meet. Both use the same Character class derived from VRCharacter. I have used the example blueprints as templates and customized desktop usage a bit.

My problem is that I can’t figure out how to use the control rotation on the clients when using desktop (mouse) movement. It doesn’t seem to replicate so for desktop clients their view always snaps back after moving the mouse, whereas movement itself is okay.

For movement I use AddMovementInput(). For mouse pitch and yaw I use
pawn->AddControllerYawInput(val);

What is the correct way to set the Controller pitch and yaw when using this plugin?

Edit:
Perhaps, to clarify, I don’t explicitly need the control rotation to replicate, as long as the character rotates with it and the user’s camera doesn’t snap back after move.

@StephanMenzelSAP you’re wording is a bit confusing, can you please clarify whether you’re using the template characters or if you have re-implemented your own characters based on the template characters? I’ve set up and used the template for many multiplayer projects over the years and have never experienced the issue you’re describing.

One idea would be to connect to your server with the original VR 2D pawn from the template and check if the issue is there too, and work your way from there comparing the unmodified template to your character implementation.

Hello @Ben_Cykyria ,
thanks for your response.

I did use the Blueprints as a baseline to get to know the plugin as the documentation appears outdated and incomplete. I kind of re-implemented most of the Blueprints in C++ and worked my way from there, gradually removing things I don’t need.
My character class shall be uniform and capable of being possessed by desktop or VR players. So I restructured lots of things but none of these should matter much in this context.
Currently my struggle is when the client (of a listen server) is using desktop / mouse input.

After setting the control rotation using AddControllerYawInput() the camera snaps back and I can’t figure out how to suppress this.

@StephanMenzelSAP this will be very difficult to track down without the code.

My uneducated guess is there’s some problem with the network authority setup of your class. Server correcting the client, but with wrong values.
I’m afraid I can only point you to some docs that might help you track down the issue (if you haven’t read through them already of course).

“Handling Client Error and Corrections” might give you some clues perhaps

Also check your network traffic with the Networking Insights tool:

Good luck!

Thank you! I figured there wasn’t much hope. My problem with the official docs is that they all cover the regular unreal classes but VRExpansionPlugin provides overrides for all. VRCharacter is there, as well as VRCharacterMovementComponent and I thought something must be different with these.

But perhaps you know this: Should it work? Should I be able to set the control rotation on the clients as described and the camera would not snap back (presumably after replication)?

Meanwhile, I have debugged into this quite extensively and I believe UReplicatedVRCameraComponent is the problem.

I use it the same for VR and desktop usage. Meaning a desktop player also looks “through it”. It replicates its position and rotation. However, when I debug into the client it would seem as if this transform is never anything other than zero, presumably because there’s no tracking and therefore no updates.

So, whenever I add pitch or yaw input, the replicated camera component rotates the camera right back to zero.

I have tried all kinds of switches like bFPSDebugMode which seems to be for that case but none helped.

So, I see two potential fixes:

  • Replace the component by a regular camera component for desktop controlled characters
  • Instead of using AddYawInput() I can try to rotate this component instead and hope it replicates

Both seem rather hacky to me.

All right, I could finally solve this puzzle.

Reason was that I have set the various settings that determine the camera component’s behavior only on the client, but not on the server where the character spawned.

Here are the settings:

VRReplicatedCamera->bUsePawnControlRotation = true;
VRReplicatedCamera->bAutoSetLockToHmd = false;
VRReplicatedCamera->bLockToHmd = false;
VRReplicatedCamera->bFPSDebugMode = true;
VRReplicatedCamera->bUpdateInCharacterMovement = false;

if (UVRCharacterMovementComponent* const cmc = Cast<UVRCharacterMovementComponent>(GetMovementComponent()))
{
	cmc->bAllowMovementMerging = true;
	cmc->bUseClientControlRotation = true;
	cmc->bRunControlRotationInMovementComponent = true;
}

When I set these on both client and server (as they do not replicate) it works.

My takeaways are:

  • It is possible to use desktop or vr with the same UReplicatedVRCameraComponent
  • Setting the control rotation via AddYawInput() on the client is okay
2 Likes