I just clone VRExpPluginExample Master branch And Rebuild, Same things occured. I try check the vive_character’s replicateCamera use pawn rotation, the tracking issue solved, but When I set Player count to 2, I found that we cant see each other like the vrcharacter is not replicated at all.
I’ll look into if the latest 4.27.2 patch broke anything here, but the core cause isn’t a plugin bug so much as the engines PIE being setup incorrectly for multiplayer VR.
They added a pull request to “fix” multiplayer testing in editor for VR and actually broke it more. I worked around it locally in 4.27.0 and .1, hadn’t checked if .2 messed with it again.
Does it work with play under one process still enabled btw?
It works with play under one process still enabled. Can I just use setting to continue my development? Or I best use 4.26 .thanks for your reply
Yes, that is actually usually enabled by default, you turned it off.
I have a question about the VR Expansion plugin. I’m having trouble figuring out exactly how the camera location is determined. There’s a VRReplicatedCamera component on the character. Is its position controlled by the plugin, and does it change as the HMD moves around? I’m trying to temporarily move the camera to a separate actor but I want it to seamlessly start in the same place. The new actor is not a VREP, it’s just a UE4 actor with a camera component. I’m having trouble figuring out where to place new actor to line up.
In UE4 my tracking origin is the Floor, so there’s some offset being applied and that’s confusing things. I’m not changing my pawn, though, so I think that offset should not change when I switch the camera to a new target? So basically I am wondering how to access the ‘pre-hmd-offset’ location of the camera on the VREP character?
Thanks for any suggestions!
isn’t a question about VRE so much as about how cameras are handled for VR in engine. I didn’t setup the camera behavior, Epic did.
However to “line” them up you would place the new actor in the exact same location, the camera moves in relative space, the actors location is the center of the tracked roomscale. If you have a tracked camera on one pawn/actor and a tracked camera on another pawn/actor the camera will be at the same relative space position in each when tracking is enabled.
If you want to place the HMD at a specific location you can move the actor to that location minus the relative position of the camera. Or if you are using my character class you can call SetActorLocationAndRotationVR to directly move it to place the HMD at a specific spot.
My problem with the plug-in so far has been hand animations not playing when the game is launched. They will play perfectly fine in engine when I test, but anytime I try an actual build, even your freshest TEMPLATE guns they all do not play hand animations while grasping the weapon. Hand animations will work on everything else, while climbing, when grabbing sliders, melee weapons work, but any gun I make the hand stays open all goofy like when trying to hold any gun.
How can I fix ?
Hi,
First, many thanks for awesome plugin. Been using it for 2+ years now, I simply couldn’t do without it (or, more precisely, I would do without it, but that would be a mess)
Anyway, I’m using the 4.27 branch (4.27.2, no chaos). I’m using an old HTC Vive, default configuration, nothing fancy. With 4.27, I’ve passed my VRE-based projects to OpenXR, I still have weird finger curls (I use Index controllers with my Vive), but somehow it works. Except I realized two days ago that I have a performance issue under certain conditions.
When I use my own VRE-based project with non-physical hands, I have no problems, I reach a solid 90 fps in any conditions in the editor and in a packaged game.
Now, if I use physical grasping hands, I have an issue. After a few dozen snap turns, there are increasingly FPS drops when turning, progressively to the point that a frame takes 30-40 ms to draw just after a snap turn. After a second, the FPS gets back to 70-80 ms but never recovers and each snap turn is then choppy.
I though it was due (obviously) to an error in my own code, but I just realized that I have the same issue with the VRExpPlugin example that comes with the 4.27 master example. Very noticeable to insufferable temporary but systematic performance hits after a few dozen snap turns, at each new snap turn. Only with physical grasping hands (again, without physics-based hands, solid 90 fps)
I realize it’s not a very accurate description of the issue, but would you have any direction to point to? My VR configuration predates OpenXR and 4.27, so maybe I have an undetected SteamVR issue here. Any indication would be appreciated. Thanks.
Ps: my own binary version of VRE and VRExpPlugin is from 20th September 2021. So it’s possible (and likely) that I don’t use the latest binary version, but I did not notice any such issue in the 4.27 patch notes.
Edit 21/12 - Reinstalled Vive software + steamVR to be on the safe side, then downloaded a fresh master zip file of the VRExpPluginExample, and have still that issue : When I respawn grasping physical hands + I switch to HMD orient and snap-turn a few dozen times, then each time I snap turn I have a huge fps drop and a visible slow-down.
Thanks very much for your plug-in。
I have some problem using the grap system.
i attach an actor to a grippable static mesh actor, and when i grab grippable , i only pick up actor, but i want them all. is there some useful settings can help me grab them together?
btw version:4.27
What platform and what engine version? There was a bug with packaged animations a long time ago when the hand socket first came out but that is fixed and plenty of people are using it packaged now in the current 4.26 and 4.27 versions so you would have to be using a binary older build.
There was also an issue with the grasping hands not updating bone transforms when out of sight but there is a setting on the skeletal mesh to enable that, I had never ran into it personally but someone mentioned it recently and I corrected it it the template BP.
Snap turn with character teleport and grip teleport? Also an actual snap turn or a smooth turn with it?
I can spam snap turn with physical hands hundreds of times with no slow down to frame timings so yeah that is very strange and its going to likely come down to debugging it through you.
The only direct thought would be if you were running the 4.27-chaos branch it would be explainable
Attachment in engine is one way, if you attach something to a parent, only moving the parent will move the child. The only exception to is if you are using a physics force or constraint to move the child and you weld attached them together and they are simulating, then the child can move the parent as well.
If you want to do it without physics then the easiest method would be to “promote” the grip to the attach parent when you go to grip. IE: search up the chain of attachment parents for the top most and grip that at the same transform.
Snap turn with character teleport and grip teleport? Also an actual snap turn or a smooth turn with it?
respawning “Physics Grasping Hands” + switching to “DPadPress + HMD orient” + actual snap turn yes.
if you were running the 4.27-chaos branch it would be explainable
No, the regular 4.27.2 binary
its going to likely come down to debugging it through you
I was afraid you would say that At least that somewhat confirms it’s only me, it’s a start …
Actually I did manage to reproduce it, and it looks like the engine doesn’t like something I was doing. Unknown as to why but there is a simple workaround.
In the grasping hand for the OnOwnerTeleported nodes, unlink the second delay like in the screenshot. It works without it and for some reason that was causing . Gripping anything also cleared the “issue” but that is obviously not dependable, its something with the body instance bugging out engine side. I’m fixing it in repo but it is easy enough to solve locally following :
I indeed got my sustained 90fps back, I am super relieved. Thank you so much !
ResetOrientationAndPosition() has been driving me crazy so I came up with a solution that works well with the Valve Index in UE 4.21.2, which I am still using for backward compatibility with other projects. But looking at the source for SteamVR in 4.26.2, it is still doing the same thing as before.
void AAlkCharacter::OnRecenterXR() {
auto xrTrackingSystem = GEngine->XRSystem; // interface to HMD
if (!xrTrackingSystem)
return;
auto posBefore = xrTrackingSystem->GetBasePosition();
UHeadMountedDisplayFunctionLibrary::ResetOrientationAndPosition();
// !!! ^ in room scale, position Z will be offset to the floor
auto posAfter = xrTrackingSystem->GetBasePosition();
xrTrackingSystem->SetBasePosition(
FVector(posAfter.X, posAfter.Y, posBefore.Z));
}
Hi,
I want to recognize the hand trail as an input to UE, just like “The Wizards - Dark Times” do.
is there any good idea to implement ?
Just a discussion,thanks!
Well there are a few different marketplace assets for gesture detection that would work.
However if you are using plugin already it also has gesture detection built in, the example map has it implemented and it includes built in spline visualization for it.
youtuber was kind enough to go over implementing it:
Hello,
I’m working with the Example Template on 4.27 and running the master branch of VRE and having an issue when using Navigation or Out of body Navigation.
When an object is in hand/docked at hip and using either navigation mode, the Pawn Character moves erratically.
It appears that I’m getting a collision with the gripped/docked object and trying to navigate around it.
If I drop the object during the erratic movement, it inherits the movement velocity (like thrown) and I finish the navigation normally.
Sorry if has been addressed, need to read through the whole thread!
Happy New Year!
Your object is blocking the nav mesh, that is a simple toggle on the object, or you can live set it with:
Its not colliding with the character, its opening a hole in the nav mesh below it and causing it to be unable to find a path, you can turn on visualizing the nav mesh to see it.