VR Expansion Plugin

Is there a way to entirely disable the feature that stops you from putting your head through a wall which causes the entire environment to move away from you?

Also is there maybe a way to make the screen go black instead of moving the whole environment? I feel like the whole area moving might cause some motion sickness in other people.

Thanks!

Do you have any code in the construction script for it? I have references to grippables all over the place.

bUseWalkingCollisionOverride lets you control it to only happen when moving with artificial movement. Also it is controlled by the pawn channel so you could just set pawn channel to default overlap and it would never happen period.

As for making the screen go black, yeah you can do that on impact, i’m also adding a boolean next update that you can check for “is currently impacting” as wall or object and do whatever you want with the screen.

That might be it - I’ll try removing the code in the construction script and see if it still crashes.

Hi , little issue with 4.17 and 7bfecae commit.

Function IsTracked() (called from blueprint) is always returning false, event when controllers are actually tracked.

Yeaaaaaaa…I re-based the motion controller so that it is a child of the default engine motion controller class now because Epic added a bunch of library functions that reference it.

Unfortunately I need custom code in the pollController function and both it and bTracked are private to the base class, so that function is returning the base classes value that I have no access too.

I’ll add a “GripControllerIsTracked()” blueprint function in to access the overwrite variable I am using instead as I also cannot override the original UFunction::IsTracked().

Edit is of course less than ideal, but everything I would need to change here is private and I need the grip controllers to be children now so that their new library functions work with them.

Socket Grips, Oculus Touch vs HTC Vive controller rotation offset

Hi !

I have a quick question that I don’t believe has been covered yet (apologies if so) and is hopefully useful to other VR Expansion Plugin lovers too.

Concerning Slot grips - rotating slot ‘snap’ transforms based on HMD Type
I am facing the situation where I would like to support multiple HMD Types in the easiest way possible.
The orientation of the HTC Vive wand is different to the Oculus touch - based on their physical design.

Example: If a player picks up “GunBase” with the primary slot grip using the HTC Vive wand, the weapon is aligned perfectly to the HTC Vive wand (because of the VRGripP socket transform). If the player picks up the same GunBase using Oculus Touch, the socket needs a 40~ degree rotation offset in X to feel equivelant/comfortable otherwise it is pointing at the sky.

I think could be a potential consideration with future motion controller types - Microsoft mixed reality controllers, potentially LG SteamVR controllers, etc.

is my current idea to apply a rotation-offset based on HMD type (and current object type) and was wondering if you thought was OK:

In the construction scripts of base grippable actors, apply a rotation offset to the VRGripP sockets based on the current HMD type.
Implementation:

  • Cast to game instance, check a struct to get rotation amount as floats or rotators
  • apply to the VRGripP socket (I am not 100% sure it is possible to rotate a socket with BP at runtime)

I thought could be a flexible way to do :

  • The rotation offset is checked and applied only once - during construction of the object
  • The rotation offset can be applied on a per-base-object basis (some objects might need a negative rotation offset, some need none, some need a positive offset.)

In other news, extremely excited to see all the updates to the plugin, your new patreon and the 4.17 updates. I’m still using 4.15 and the latest VRExpansion build for it, and looking forward to updating to 4.17 with all the VR Plugin changes and VRCharacter examples - gameplay tags, etc.

Adding / subtracting rotations is “ok” as a solution, but proved to be a little too inflexible for me (per object positional changes may be required too). In 4.16 I added an optional OverridePrefix to the “GetClosestSocketInRange” that can be used to target a different socket on the item based on which HMD / controllers are being used.

The reason just modifying rotations seemed inflexible is because someone wanted to have say a coffee mug to be held with two different hands, is another edge case that is controlled entirely by gameplay and object.

For Instance: VRGrip or VRGripTouch or VRGripTouchLeft/Right

So I just added gameplay tags for “HasTouchSpecificSockets” and “HasSeperateSocketsPerHand” to the template, if either is true it passes in a different socket prefix to search for on the object which is a generic method of handling it.

I am going to also add passing in the motion controller to the “GetClosestSocketInRange” interface function so objects can specifically act on which hand is using them, but in the end that is a lot more specific work to handle and is out of artist / level designer control.

However altering socket transforms post getting their positions (adding a transform to the result) is totally doable and can be done easily and was my first thought on it. I only went with the more complicated solution because it supports any number of different things with sockets. In the end if its only rotation and only per controller that you are looking for, concatenating a rotation to the transform is likely the quickest way off the ground.

Also the gameplaytags are there for the end users mostly, its a way of exposing more input from the objects without me directly coding special variables into the grippables myself or adding more things to the interface functions.

Made a brief video going over those two most recent additions to the plugin that I feel were confusing as to what they did.

For some reason the beginning part didn’t record but it was just going over why I grip at the Center Of Mass and introducing the changes I made, it starts up showing the actual differences so I didn’t feel the need to re-record

Thanks for the detailed and insightful reply, much appreciated as always! The Gameplay tags implementation sounds great. Really keen to upgrade from 4.15 asap.

Just wondering if I could double-check what you meant with suggestion. Would trying to transform the actual VRGripP1 sockets in the base-object’s construction script be a quick and simple (temporary) approach? I thought, way, the transform is done on object creation (if the particular HMD-type is detected) and never needs to be checked again for the life of the object. And the pawn doesn’t need any change to correctly slot-grip the object. I’m not sitting near Unreal so couldn’t check if a socket itself can be rotated/transformed at runtime.

Rotating sockets at runtime isn’t possible in blueprint, it likely is in c++ but is more backwards than adding a transform in, adding in a transform could also support “left/right handed” dynamically.

Is there a way (through the grip interface or something) to notify an already-held actor of grips/drop that happen to other actors from the second hand?

Basically I have my backpack set up such that you can drag stuff into it, then it will resize and disable collision, and resize to normal and reenable collision if you move it out of the backpack, but I also need to know when an actor is dropped while overlapping the backpack (or at all), but I don’t see a clean way to handle without either making the backpack a component of the player, or finding if it’s currently held already, checking if it’s a backpack, then notifying of a drop.

I suppose I could put another interface on it, check if the already held actor has it, then notify that way. I’m just wondering if there’s something there for already.

Thanks!

No current method no, its not something that generally is needed in the scope of the plugin.

Sort of figured as much, but I wanted to make sure before digging into another method. Thanks again :slight_smile:

Removed the component from Vive_PawnCharacter and am now using an interface to notify of drop events, and removed the code from the construction script - seems to have fixed my crash.

Hello ,
I’m very impressed by your work, I have a project where simple architectural room, I want to send it to my colleague in the other location and we can both spawn in the same room and see each other and able to talk over the microphone, is it possible to do it? Do you have any pre built tools for ?
Thank you very much.

Hi ,

the plugin is getting impressive day by day. Currently i am working on a laboratory/architectural project using your template. Can you create a kind of toilet shower using particles. For me particles is not working the way i want… Also are there templates for particles in unreal… so that i can copy and tweak as to the requirement.

regards
Jo

Well, if you used the Replicated camera and grip controllers they replicate by default so it would work, would just have to open a session or use the “Open IP” command in console. Voice is simple either by making it free talk or by using the advanced sessions plugin tied in to the template and adding a toggle button (or in my example I had, moving a microphone object close to the mouth triggers speech).

There are a ton of particle packs on the marketplace, also the [video]https://docs.unrealengine.com/latest/INT/Resources/Showcases/Effects/WaterExamples/[/video] page lists the location of an effect that you can likely tweak. GPU particles with gravity and collision would be what you want, they won’t be “fluid sim” like but without using one of the custom NVIDIA branches you are out of luck there without manually doing it.

You just have to be careful with particles in VR as they can get really perf heavy, more so if you are using heavy transparency without dithering on them.

  • Is there a way to get the Secondary On Use to fire on trigger from the secondary controller when a grippablestaticmesh is already held with a toggle-grip in the primary hand? I have it so it removes the OnTrigger Grip/Drop so that using the trigger on the second hand no longer switches grips from the primary hand, but I can’t see a tag for SecondaryOnUse and it doesn’t fire when the primary on use is set. I also tried using the secondary grip on trigger, but that just swaps grip to the off hand.

Basically, I’d like to have it work so that you grip the backpack with the primary hand (toggle grab on trigger), then any trigger fire on the backpack from the second hand will fire an event I can use to see if the user is trying to grab an item in the backpack (using my own overlap logic).

Sorry for so many questions, thanks again for all your help.

You can manually call SecondaryOnUse on the object from anywhere, make use of it as you will.

The primary usage of it is when there is a secondary grip (two handed interactions) then it will call it automatically, but you are free to hook it up outside of that by directly calling the interface function on the held object.