VR Expansion Plugin

You can use a normal trace instead of a sphere trace, it already attempts to pick up the first collision from the array of ones hit, but when in penetration it falls back to overlap. There are grip priority settings as well but it would be annoying to try and juggle that.

The pickup selection is entirely blueprint in the template and up to you, can change it freely.

Ah excellent, I will try right away! Is there anything in your documentation that speaks about how to change it from sphere to normal trace? plugin is amazing, I will be joining your patreon to make sure project continues indefinitely… you have saved me so many hours already!!!

The docs don’t really cover the example template, but if you go in to the character under the Gripping function category there is a function called “GetNearestOverlappingObject”. You can change the multi sphere trace to a multi line trace or even a simple line trace.

Its a multi trace by default as it allows you to use the GripPriority field to filter overlapping objects by their priority (IE: a slide on a weapon wanting to be picked over the weapon itself in most cases when a trace hits both).

I switched the multispheretrace to a multilinetrace, but I still get the same behavior. I am guessing there must be other modifications necessary, I think I need to learn a bit more about these functions before I continue. Thank you so much for the help though!!

Hi !
Any possibilities to make widget visible and interactable only on PC screen and not visible for VR Player? Could it be done without multiplayer thing? Can’t really find out related functions in docs, but maybe someone can suggests some tricky way. Now I used to smoothly fade out HMD, disable stereo, add widget which now correctly positioned on PC screen, but method excactly ruins user experience. And yeah, game controlled by second people on PC.

How\Where do I " Override GetClosestSocketInRange" ?

Currently that is actually a rough ask, you would have to manually handle the mouse coords and render a custom texture to the spectator screen. Epic has had notes about properly handling screen space with multiple “players” with VR spooled up but they haven’t gotten around to it for 5 engine versions or so.

There is a marketplace asset that brings up a secondary “control” window that you can place UI inside of to communicate though, that should work fine if you are ok with the second instance.

In the objects interface function overrides on the left side, the MeleeBase overrides that function if you want an example.

I took a look at the blueprint for BP_Teleport_Controller, it shows that there is a laser highlighting object. Is that to highlight the object? If so how do I get it to highlight the object because it doesn’t look like it does.
Are you able to show me a screen shot of where the collision check is? I have been looking around and im not exactly sure which one it is.

That is for the “toss to hand” function in there, it doesn’t highlight currently. You could trigger a highlight on an object with any standard highlight method (inverse copy, custom stencil, ect).

hello,

I have an issue here which keeps me banging my head against the wall for days now…

Our current project is set up as a VR project, but we like to use it in desktop mode now:

I need to “teleport” the player in the level, for I use the “TeleportNowVRPlayerLocationAndRotation” Node, followed by a "SetActorRotationVR"node.

But after every teleport, I get a x-axis offset of 8cm,
even when I teleport to the current location/rotation.

offset varies from different computers and headsets. On oculus, I get an additional z-offset of 175cm, sometimes 168cm

To investigate that, I printed out the VR-Expansion Functions values:
“Get VRLocation”
“Get VRHeadLocation”

here, I can see the offset. the “VRHeadLocation” is -8cm on x-axis compared to “VRLocation”

My question is:
1: Where does offset come from? How can I zero it out?
2: Is there a “non-vr mode” or “desktop mode” setting for the VRExpansion Plugin?

any help is very welcomed, since I am close to a mental disease here…

That offset is in the root component and it pushes the capsule back from the face, its the CapsuleOffset variable. The “GetHeadLocation” node is just a shortcut to getting the transform of the camera. The way that VRLocation works is that the offset is considered the “body” location, since it is inset from the eye perspective (foot position when standing).

Actor Location = Foot level (Z = 0) center of tracked roomscale
VRLocation = Capsule location, offset from HMD (at waist level since that is standard for characters).
HeadLocation = Actual location of the camera

If you wanted to teleport in place you would SetActorLocationAndRotationVR to VRLocation, but subtract the half capsule height from Z, that would place your “foot position” at the same spot. Basically the inverse of the standard engine teleport of adding half capsule height to a trace hit for teleporting.

If you used the TeleportTo node against a world location (like a floor hit) you can use the shortcut node:
https://vreue4.com/GeneratedDocs/VRE…tLocation.html

Which would offset the location to make the correct target.

If for some reason you want the “camera” and not the “body capsule” placed at the teleport location, you can just get the delta from HeadLocation and VRLocation and add it (well that or remove the capsule offset, though that is generally not the best idea).

As for the oculus setup, it sounds like you aren’t in roomscale so basing off of the head is going to be different at eye level.

The template has a teleport setup using the replicated teleport action.



It accounts for the delta rotation that the epic templates teleport has.

Hello, we have an issue with the HMD and its replication.
We don’t know why, the hmd call the replicated variables only when it is not in our head… Somone know why?

Are you pausing the character movement or the game when the hmd is off the head? It functions correctly by default so unless you are interferring somewhere it shouldn’t have that issue.

The only thing that would stop it would be the actual HMD not tracking, or the ticking being stopped.

Can you show me a screenshot of where I would add in to trigger a highlight method? I know that it would be under the BP_Teleport_Controller, but I still can’t seem to figure out which part of the blueprint.

When the laser is active? I don’t have anything running consistant traces unless the laser is active, at that point you would look in the UpdateLaserBeam function to see that there is a LastLaserHitResult variable that you can use.

If not when the laser is active, then you can run a consistent trace anywhere you want.

Hi how’s it going
I thanks for your free plug in when I saw in youtube very useful tools for VR . we work a project VR and we work 4.26.1 version but we can’t find plugin for version pls update for using plugin thanks a lot…

Master branch in repo is always current engine version. A sperate locked branch is only broken out when an engine version is outdated.

Posted a new patch note log of compiled changes since the last one>

https://vreue4.com/4-26-patch-notes?..ges-03-05-2021

Also a very important notice regarding a late engine fix that came in on 4.26.1

https://vreue4.com/4-26-1-and-why-hotfixes-matter

Hello, I am using your VRExpansionPlugin and the Vive_PawnCharacter, and have set air conrol to 1 in VRMovementReference, but I still have zero control in the air. Any ideas what I may be doing wrong? Also thank you for all your work on plugin, you have saved me tons of precious time and energy.