I got it working! works as an inventory system now
Hello
First off I wanna say thank you for contribution, I think it’s good to have a propper base setup so that people don’t have to reinvent the wheel in every VR project.
But I’m having some problems using it as I’m not really sure how to go about it, I’ve spent the last few hours migrating the parts I need in my project, that being the character pawn and now I’m working on the hands.
I downloaded your sample project which has given me some insights on how you use the plugin. But I had a hard time finding code for the specific functionality I was looking for.
The gun in your sample project has little box you can drag back and forth, where is the code for ? Is all handled by the interface somehow?
I also had a look at the FPSVive pawn, it had a LOT of code I saw was made with multiplayer in mind. Are we all just supposed to copy or does come with the plugin somehow? I read in the docs that things are made with multiplayer in mind.
I really liked how you solved the problem of players clipping their head through meshes by pushing back the players. However I noticed that with comes a problem. Leaning over something like a fence or a small box is no longer possible as it collides with the bottom of the pawn which is understandable. Do you have any plans of solving even though I understand it can be really difficult.
Edit: thread is getting way to big to read through it all in hopes of finding someone with the same problem as one self and see a solution. I would recommend putting up a forum for plugin. In the bitbucket issue tracker you recommended people to post here so that everyone could see that answer.
Thanks!
You can set anything you want to not collide with the player if you wish and it won’t block the path (ignore pawn collision channel), for fences either an offset collision or manual block could be used instead. I had some thoughts about separating head and body collision awhile back but its gimmicky without foot or waist tracking so I removed the code and put it on my trello as something to look at again later. There are simplistic ways of handling it (don’t register capsule block until head is > distance from body) but they are either gameplay specific or have downsides so I haven’t built them into the plugin. Generally small objects I have set to ignore collision with the pawn capsule and only set things like full walls are large objects to collide.
The multiplayer code for the character doesn’t really slow it down any for single player enviroments, it could be removed or not without issue.
The box on top of the gun in the template is a grippable component set to be interactive in its properties, then the properties are filled in for how it behaves. There is no special blueprinting for it.
Thanks for the reply.
I wish you the best of luck with the tinkering of the collision as it’s a hard topic.
I don’t believe it slows it down, I will need it in my game. I’m more wondering if there is anything important I’m missing if without it. As just migrating it to my project didn’t work.
I figured could be the case, but was wondering how it was locked in place and only allowed to be moved in one direction. I wasn’t able to find any properties for that you had set. I did have a look to see if any axis were locked but they weren’t. Also I believe that is world axises but I could be wrong. It shouldn’t be too difficult to blueprint but again, why reinvent the wheel?
The interaction properties set that.
I created a test project based on your example template, packaged it and tried to upload it to the Oculus store to see if it would work. Oculus rejected it with the error:
The package contains DLL libraries that are known to cause issues when running on the Oculus platform. These files must be removed prior to uploading: Engine/Binaries/ThirdParty/OpenVR/OpenVRv1_0_2/Win64/openvr_api.dll, Engine/Binaries/ThirdParty/Steamworks/Steamv132/Win64/steam_api64.dll
Do you know if is just an issue with the version of the api.dlls or does Oculus just reject anything built with the steam APIs?
Steam api doesn’t cause issues with their platform, they just reject anything built with it…likely because it lets the program communicate with a competitors service and they want their games launched on their front end. That being said you can untick the Steam/OpenVR plugin in the engine and it won’t compile it out anymore. You would have to be sure to not use any of the steamVR specific code however as the plugin assumes that steamvr is available if compiled on a windows computer (controller skinning, tracked device properties). The controller skinning wouldn’t work on oculus plugin anyway so it shouldn’t really be a problem.
The motion controller backend and HMD backend are platform agnostic and should work with the oculus plugin, I can’t test however as DK2 was my last oculus hardware.
We’re trying to have a two bone IK to link our shoulder piece to our controllers.
Whenever we select the bone on the Two Bone IK it crashes UE4.
Using the two bone IK is how you got your arms to work correct?
Nah, it likely would be the correct way to do it though. I used the FABRIK node to link the bone chains from the shoulder to the wrist and set the wrist target to the controller + a positional offset.
In your preview your secondary hand attaches to the “VRGripS1” socket on the gun. Where is code?
Edit: Also, I migrated the important stuff from your sampleProject, but for some reason moving the top cube on the gun does not work.
Thanks!
In the grip function it checks for “Primary Grip socket in range”, if it finds one then it grips it there by passing in that socket transform.
Suggestion: Add a third person camera, one that outputs to the monitor.
That way you can see around your VRCharacter and his surroundings.
Thats not something the plugin needs to handle as without re-writing part of the hmd code and making a new class for it I would have to render to texture and display the texture to the screen witch could be done just in blueprints instead.
Also seperate views to the window is something currently slated to be done by epic themselves probably in 4.15 and integrated by default.
I’ve been able to use IK (in my case on the hands but using a full body model) working without a hitch using BIK but I have not tried it using Two Bone IK. In my case (using BIK) I placed Effectors on the controllers themselves. There are some feet grounding issues which I haven’t fully worked out yet but had time to dig through on focus on fixing. That may or may not be helpful but figured I’d mention it.
Yeah like I said, FABRIK was quick and dirty to get the default arms working, but with a rig built for IK it shouldn’t be required.
I`d like to limit the maximum distance the controllers can get away from the camera to prevent cheating in multiplayer. What is the best way to tackle ? Should I be adding an offset to the controllers if they exceed some distance?
I wouldn’t bother, I would just turn them semi transparent for visual feedback and deny using anything and drop anything held. You would have to account for a large persons wingspan though and would probably want to limit it only on the distance of the x/y axis.
For roomscale bounds I have a Trello note to limit the HMD and motion controllers to the drawn limits to prevent tracking loss sometimes throwing them out of it…however I realized that the actual tracked space is significantly larger than the drawn limits so that would be a bad idea.
I’m going through things I might want to implement on my upcoming two weeks off for the holidays, I think primarily I would get a server browser / basic multiplayer up and running, also have a note for a component to handle drawing / defining manually areas within the tracked space to set as visual boundaries in game (draw around a chair for example and have it shown in the relative roomspace in game).
I might tackle climbing but the mechanics of that are so unique from implementation to implementation that I have been avoiding doing so.
Any other ideas?
The idea of a manual ‘tracked area’ component as you describe sounds absolutely incredible!
How would work? Does the user draw these manaul areas during runtime and the areas are seen?
Could the user draw these areas while in an editor preview of the game and receive the results in unreal editor after quiting the session?
I have made a 3d model of the entire studio space I work at and it is a pain having to re-adjust the virtual “tables”, “filing cabinets”, shelves etc after they have been moved.
It would be so cool if, in VR the user could plot that data and then see the results back in the editor to shift the virtual objects to line up.