Fixes for common UE4 + Oculus Platform issues before submitting to Store
In this post, you will find potential fixes for UE4 issues with VRC.PC.Input.3, VRC.PC.Input.2, VRC.PC.Input.10, VRC.PC.Functional.3, Leaderboards, Achievements, and Online Sessions. Feel free to jump to the point you need instead of reading everything, but I'm sure you will read these tips more than once. :) ---------- Background: It's been almost 2 months since I started to implement the Oculus platform in my game to be compatible with the Oculus Store guidelines, and it's been a bumpy journey for many reasons. Thanks to the UE4 community and the Oculus Developer Support team with their fast and active responses, all has been solved in a short time. Below, I will describe in detail every single issue I faced, which should help you if you're facing the same problems: Main reason for me was bad timing, Oculus had a bug on their "online session" (but the fix is available now and probably merged with 4.21.1 ) , as for Official Epic launcher version of UE4 still have bugs regarding "online session" and "Re centering VRC.PC.Input.3" which makes it total useless as both "online session" plugin and "OculusVR plugin" is old and have bugs that will prevent you to make successful session or pass " VRC.PC.Input.3" so the only path you have to take is to download latest Oculus branch of UE4 from github. Another reason was lack of clear and updated information on the Oculus + UE4 integration. I couldn't find any YouTube videos on how to implement any of the platform services. The only information you get is from the Oculus documentation, which is not always clear if it's referring to the official Epic UE4 branch or the Oculus branch of UE4. nodes that will be shown available from sample project called since in the document it mention how to obtain top 10 from leader-board with BP using array but there was no such node with array input or unlocking achievements which never worked (only tested on epic launcher version regarding achievements). https://forums.oculusvr.com/start/discussion/71115/how-to-get-top-10-from-leaderboards-with-bp-in-ue4#latest UE4 has many Blueprint nodes like "Unlock achievements" and "Leaderboards", which you expect to work out of the box but doesn't. If you are new to submitting to the Oculus store like I am, you will first blame yourself and spend days fixing your code, finding out later the node is broken in the engine itself. Hopefully when you read this, most of the issues I faced here will already be fixed. I will also mention some tips on how to fix some major issues in your project before you submit to the Oculus store. When I first submitted my project, I got a list of issues below of test results I needed to fix: VRC.PC.Input.3 - Selecting Reset View in the Universal Menu must reset the user’s position and orientation. VRC.PC.Input.2 - Single-player apps must pause while the Universal Menu is open. VRC.PC.Input.10 - In-application hands and controllers should line up with the user’s real-world counterparts in position and orientation. VRC.PC.Functional.3 - Single player apps must pause when the user removes the HMD. I will describe these in order. ---------- VRC.PC.Input.3 - Reset View should work properly: Make a new actor To fix this issue, use the Oculus 1.32 plugin which has the fix already and is (for now) only available on Oculus branch of UE4.21.1. Or fix the code from the source of UE4 which i'm not sure if its possible using epic launcher, if its possible then its not easy as the plugin is Engine run-time plugin. You need to call "Set tracking origin" on your "Event begin play" to "Floor level" and not "Eye level" (unless your game uses "Eye level"). Otherwise, the engine will use "Eye level" as default. You need to make a new actor and call it something like "OculusHMDNotifications" and drop it on every level you have. *(images i use in this post is from my own project and its named "mainmenu_bp" instead of "OculusHMDNotifications" ) Add a VRNotifications component to it from left side then drop it on your graph as a reference so you could bind below 3 event from it just like the image "hmdputonheaddelegate", "hmdremovedfromheaddelegate" and "hmdrecentereddelegate" Once you done your result would be like below image. Now add pause and reset position nodes to it just like below image, since we added HMD Remove/Put node here then we already fixed "VRC.PC.Functional.3" issue here too :) Done! It will work now as it should ---------- VRC.PC.Input.2 - Game should pause while the Universal Menu is up Remember the actor we created named "OculusHMDNotifications"? Open it and go to "Class Default " on the top side when you click on it You will see a detail panel of your current actor, make sure to checkbox on "Tick even when pause" so when you pause your game you will able to unpause it again later. Now add Set game paused and connect it to "has system overlay present" just like below imagine on event tick. Once you done it will work as it should. ---------- VRC.PC.Input.10 - Hands and controllers should line up with the user’s real-world In Oculus branch of UE4.21.1 from github you need to open sample project located in UnrealEngine/Samples/Oculus/HandSample after that migrate the hand to your project and add the hand/controller to your character hand and recenter/rotate your game hand to match with the sample provided then you can delete it: https://developer.oculus.com/blog/implementing-quality-hands-with-oculus-touch/ ---------- Achievements: Achievements are broken on UE4 and you can't unlock Oculus Achievements using built-in BP nodes (not sure about Oculus github version of UE4 since i only tested Achievements on Epic launcher version) so what you have to do is to move the source of working code from SDK project "Samples\UnrealSample" and add it to your project then compile your project and use the new nodes just like in the sample project. (Its not as easy as it sound but its the only way) - Make sure to add your achievements on your portal/dashboard.oculus with ID that match your game Achievements ID just like steam. -And config your app for Oculus on DefaultEngine.ini like below (not sure if the last line "Achievement_0_Id=" is required like steam or not but i kept it for now) and make sure to change YOUR_APP_ID for OculusAppId to your actual App ID: [OnlineSubsystem] DefaultPlatformService=Oculus bHasVoiceEnabled=true [Voice] bEnabled=true [OnlineSubsystemOculus] bEnabled=true OculusAppId=YOUR_APP_ID Achievement_0_Id="NEW_ACHIEVEMENT_1_0" ---------- Leaderboards : Same story as Achievements but it gets even worse even when you move the codes regarding Leaderboard from the sample project you won't able to control on how many entry you want to get or even get your own rank or friend list rank, luckily one of UE4 dev helped me to local player rank and it needed to adjust the source code of sample project so i will post it here later. as for now i believe when you read the leaderboard it will get top 100 (no confirmation). - Make sure your app is DefaultEngine.ini like above i mentioned for Achievements. - Don't forget to Setup Leaderboard on Portal/OculusDash before anything else. ---------- Online Sessions: This one was the biggest headaches of all time - - First you need 2 separate machine or VM for testing just like Steam session. and make sure you add the 2nd account as developer or invite him to RC channel (this is very important part) i believe alpha channel doesn't work but i can't remember so make sure you do your online test with uploading your game on RC channel. - Online session using Epic launcher UE4 is total useless and broken and on top of that Oculus version of UE4 on github had its own bug but fix issued and probably its merged by now "https://github.com/Oculus-VR/UnrealEngine/pull/25" - If you need session like steam when 1 player make session and the 2nd one find it from the list and join then make sure to make a pool on your portal with "Browse" mode like below image and give it the session name "Pool Key" before you even start with coding your session on the engine side. - For creating session use node "Create session " using Oculus session plugin not the default engine one. and put the Pool name same as the one you created on above image "Pool Key" then open level with "listen" parameter so the client travel to the server map once he join. - As for finding and joining session use "find matchmaking session" same from Oculus plugin as for join use default engine join session node, no need to open map from join session on BP since client will travel to the server map just like steam version if the server opened the map with "listen" parameter. - Make sure your DefaultEngine.ini is using the Oculus OSS Net Driver - see below. I've left in the changes I've made from the Achievements and Leaderboard sections above so you can look at the entire picture. I've also added extra lines to increase network bandwidth (optional). Make sure to change YOUR_APP_ID for OculusAppId to your actual App ID: [/Script/Engine.GameEngine] +NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="/Script/OnlineSubsystemOculus.OculusNetDriver",DriverClassNameFallback="/Script/OnlineSubsystemUtils.IpNetDriver") [/Script/OnlineSubsystemOculus.OculusNetDriver] NetConnectionClassName="/Script/OnlineSubsystemOculus.OculusNetConnection" [/Script/Engine.Player] ConfiguredInternetSpeed=20000 ConfiguredLanSpeed=25000 [/Script/Engine.GameNetworkManager] TotalNetBandwidth=32000 MaxDynamicBandwidth=7000 MinDynamicBandwidth=4000 [OnlineSubsystem] DefaultPlatformService=Oculus bHasVoiceEnabled=true [Voice] bEnabled=true [OnlineSubsystemOculus] bEnabled=true OculusAppId=YOUR_APP_ID Achievement_0_Id="NEW_ACHIEVEMENT_1_0" ---------- Other Tips: Make sure you enable HRTF sound since it really makes a difference in VR. Enabling and using Oculus 3D spatialized audio is easier than you think - setting it up in your project should only take a few minutes: https://forums.oculusvr.com/start/discussion/70889/how-to-enable-hrtf-on-ue4-4-20-solved#latest If you face performance issues, try to disable/enable Oculus Dash to see if your project might have a problem with it. I encountered a performance issue before, but I couldn't confirm if it was due to Oculus Dash. Make sure to test this yourself. As you can see, a lot of info is out there in the documentation and Oculus samples, but it's scattered about and it's not always obvious which info is correct and up-to-date. ---------- My Wishlist: Oculus needs to expose their platform services (VOIP, Achievements, and Leaderboards) to Blueprints without the need to use source code from the SDK sample project. We need to be able to pass variables when we create online sessions with Blueprints, so hopefully this will be implemented soon since the "Advanced Session" plugin doesn't work with the Oculus online subsystem. Oculus needs to push Epic to update their Oculus plugin to the latest one for 4.22. Since I was able to use the Leaderboard Blueprint from the SDK sample project and had one of the UE4 devs adjust the code for me to get local ranks, the only thing left is to expose Friend Leaderboards to Blueprints. Hopefully, this last piece of the puzzle can be figured out with the Oculus and UE4 community's help. Once it's figured out, I'll come back here and update the Leaderboard section. ---------- Hopefully this info will help speed up your work! As I think of myself as a beginner with UE4 and Oculus development, if you see any wrong info here - please correct me. I also may have missed some important info you need, so please ask me and I will try my best to help you. Have a nice dev day! ---------- Tagging the Oculus Developer Support team in case I have misleading information that need to be corrected. @NinjaGaijin14KViews2likes29Comments[UE4.18.3] "JoinSession" node is not traveling to the Servers map
Hello everyone, I'm currently setting up a test project to make sure everything related to hosting and joining a session is working. I enabled full debugging on the Logs of UE4 as well as using the Tools you provide for listing active rooms. The setup: I'm using the Launcher Version of 4.18.3. The project was created with that version, so not updates happened. I'm packaging the projected and using this version on both PCs. Both PCs have Oculus Home running and a Rift connected. The "MainMenu" map is called "TestMap", while the "GamePlayMap" is called "GamePlayMap". Creating a session opens "GamePlayMap" as a ListenServer. What does work: Both Player's Entitlement check is successful. PlayerA can "Create" a Session for a BROWSE POOL (CUSTOM_POOL). PlayerA travels to the "GamePlayMap" as a ListenServer. PlayerB can "Find" the Session via that BROWSE POOL (CUSTOM_POOL). Calling "Join Session" on the Session result connects PlayerB to PlayerA. Dumping the Session Information on PlayerA shows PlayerBs ID etc. Your online tool shows both people in the same room. What does not work: PlayerB is not actively traveling to the correct map. The log files show that he's trying to travel to the "TestMap", while PlayerA is on the "GamePlayMap". What did you try to resolve this: I went ahead and made sure it's not caused by the GameMode class. That was GameModeBase and is now GameMode. No change though. I tried calling "open ID.oculus", didn't work at all. I tried hosting with PlayerB and let PlayerA join. Same result. What is your desired endresult: Once hosting and joining via the normal "Create", "Find" and "Join" Session nodes works, I would like to use the "FindSessionById" function to join a room directly. For that I forced my way into your private headers to get access to the UniqueNetID of Oculus and retrieve the ovrID as a String for now. That will then be send to GameSparks, which sends this ID to all Players (here PlayerB) so they can search the Session and join. Now for this I would love the JoinSession function to work first though. Any help would be appreciated. Kind regards, Cedric13KViews0likes15CommentsCan't get haptic effect to work in UE4 with touch controllers
I'm trying to get haptic effect to work with my touch controllers in UE4 without any success, I've tried all the methods of haptics and force feedback and nothing. Any ideas on how to get it to work? I'm using version 4.14.1 of the engine9.1KViews0likes23CommentsUE4 Can't get the guardian within the editor.
Hi, I'm doing "VR Development with Oculus and Unreal Engine" course on unreal learning. The lesson "Oculus Guardian" I can't seam to get "Is Guardian Configured" to run true on Q2 with link. Is it rift only? oculus subsystem is enabled and so is the guardian within the headset, running 4.26.5.2KViews2likes14CommentsUnity3D vs Unreal Engine?
Hi, I've installed both of Unity3D and UE4. And successfully deployed the first test app to my Oculus Quest. (It took a few days) I know it's not an easy question. But I'm really confused about which one I should continue with. Could you give me some tips? Some good reasons that I should choose one over another one. One thing I discovered is that, with Unity, you can test Headset without deploying it again but just use it in the live play, whereas UE4 doesn't have such a thing. Is that very useful?5.2KViews0likes7CommentsHang on headset launch - Problems getting started, is Mac *really* supported?
I'm trying to get started developing for the Quest 2 on my Mac. I'm new to Android, UE4 and the Oculus Quest 2. I've followed the instructions to build the Oculus fork of UE4 from source, installed Android Studio and set things up. I did have to modify the UE4 source to get it to compile. See PR #108 to github.com/Oculus-VR/UnrealEngine/pull/108 (I'm not allowed to post proper links yet). I also had an issue with a type -P command in SetupAndroid.command failing because the default Mac shell zsh doesn't appear to support the -P option to type. The two things make me wonder if developing on a Mac is actively being supported? I have been able to build the sample template project in UE4. However, on launch, everything hangs, and the last message in the output log is: LogPlayLevel: Running: /Users/erland/Library/Android/sdk/platform-tools/adb -s <serial> shell am start -n com.YourCompany.QuestOS/com.epicgames.ue4.GameActivity LogPlayLevel: Starting: Intent { cmp=com.YourCompany.QuestOS/com.epicgames.ue4.GameActivity } In the headset I first see the three dots, and then just a "black" world. At some point during troubleshooting, I got some messages indicating the .obb file was not found, and download of it was starting which might have I'm running Android Studio 3.6.3, UE 4.25 from source, MacOS 10.15.7, XCode 12.4, Oculus VR Plugin version 1.55.0. Manually starting the code using adb shell, then "am start -n com.YourCompany.QuestOS/com.epicgames.ue4.GameActivity" and then "logcat", I get the following 02-15 10:49:56.447 9320 9354 D UE4 : [2021.02.15-09.49.56:447][ 0]LogStreaming: Error: Couldn't find file for package /OculusVR/Materials/PokeAHoleMaterial requested by async loading code. NameToLoad: /OculusVR/Materials/PokeAHoleMaterial 02-15 10:49:56.447 9320 9354 D UE4 : [2021.02.15-09.49.56:447][ 0]LogStreaming: Error: Found 0 dependent packages... 02-15 10:49:56.448 9320 9354 D UE4 : CDO Constructor (OculusResourceHolder): Failed to find /OculusVR/Materials/PokeAHoleMaterial 02-15 10:49:56.448 9320 9354 D UE4 : [2021.02.15-09.49.56:448][ 0]Error: CDO Constructor (OculusResourceHolder): Failed to find /OculusVR/Materials/PokeAHoleMaterial 02-15 10:49:56.448 9320 9354 D UE4 : 02-15 10:49:56.448 9320 9354 D UE4 : [2021.02.15-09.49.56:448][ 0]LogHMD: Error: Unable to load PokeAHoleMaterial 02-15 10:49:56.449 9320 9354 D UE4 : [2021.02.15-09.49.56:449][ 0]LogStreaming: Error: Couldn't find file for package /OculusVR/Materials/OculusMR_ChromaKey requested by async loading code. NameToLoad: /OculusVR/Materials/OculusMR_ChromaKey 02-15 10:49:56.449 9320 9354 D UE4 : [2021.02.15-09.49.56:449][ 0]LogStreaming: Error: Found 0 dependent packages... 02-15 10:49:56.450 9320 9354 D UE4 : [2021.02.15-09.49.56:450][ 0]LogUObjectGlobals: Warning: Failed to find object 'Material None./OculusVR/Materials/OculusMR_ChromaKey' 02-15 10:49:56.450 9320 9354 D UE4 : [2021.02.15-09.49.56:450][ 0]LogMR: Warning: Invalid ChromaKeyMaterial 02-15 10:49:56.450 9320 9354 D UE4 : [2021.02.15-09.49.56:450][ 0]LogStreaming: Error: Couldn't find file for package /OculusVR/Materials/OculusMR_OpaqueColoredMaterial requested by async loading code. NameToLoad: /OculusVR/Materials/OculusMR_OpaqueColoredMaterial 02-15 10:49:56.450 9320 9354 D UE4 : [2021.02.15-09.49.56:450][ 0]LogStreaming: Error: Found 0 dependent packages... 02-15 10:49:56.451 9320 9354 D UE4 : [2021.02.15-09.49.56:451][ 0]LogUObjectGlobals: Warning: Failed to find object 'Material None./OculusVR/Materials/OculusMR_OpaqueColoredMaterial' 02-15 10:49:56.451 9320 9354 D UE4 : [2021.02.15-09.49.56:451][ 0]LogMR: Warning: Invalid OpaqueColoredMaterial 02-15 10:49:56.500 9320 9354 D UE4 : [2021.02.15-09.49.56:500][ 0]LogAudioCaptureCore: Display: No Audio Capture implementations found. Audio input will be silent. 02-15 10:49:56.501 9320 9354 D UE4 : [2021.02.15-09.49.56:500][ 0]LogAudioCaptureCore: Display: No Audio Capture implementations found. Audio input will be silent. 02-15 10:49:56.516 737 737 E WifiHAL : handleResponse: OTHER_RX_MULTICAST_CNT not found 02-15 10:49:56.521 737 737 E WifiHAL : wifi_get_ring_data: Error -5 happened. 02-15 10:49:56.521 1026 3833 E WifiVendorHal: getRingBufferData(l.1675) failed {.code = ERROR_INVALID_ARGS, .description = } 02-15 10:49:56.555 1026 3833 D wifi-jni: no kernel logs 02-15 10:49:56.595 9320 9354 D UE4 : [2021.02.15-09.49.56:595][ 0]LogAISub: UAISubsystem AISubsystem (0x9f344160), frame # 0 02-15 10:49:56.596 9320 9354 D UE4 : [2021.02.15-09.49.56:596][ 0]LogAISub: UAISubsystem AIPerceptionSystem (0xc5893b00), frame # 0 02-15 10:49:56.599 9320 9354 D UE4 : [2021.02.15-09.49.56:599][ 0]LogAISub: UAISubsystem EnvQueryManager (0x9ff25100), frame # 0 02-15 10:49:56.601 688 9526 E ResolverController: No valid NAT64 prefix (100, <unspecified>/0) 02-15 10:49:56.609 688 9528 E ResolverController: No valid NAT64 prefix (100, <unspecified>/0) 02-15 10:49:56.616 688 9530 E ResolverController: No valid NAT64 prefix (100, <unspecified>/0) 02-15 10:49:56.616 9320 9354 D UE4 : [2021.02.15-09.49.56:616][ 0]LogUObjectBase: Warning: -------------- Default Property warnings and errors: 02-15 10:49:56.616 9320 9354 D UE4 : [2021.02.15-09.49.56:616][ 0]LogUObjectBase: Warning: Error: CDO Constructor (OculusResourceHolder): Failed to find /OculusVR/Materials/PokeAHoleMaterial 02-15 10:49:56.616 9320 9354 D UE4 : I think perhaps the PokeAHoleMaterial is related to the OculusVR Plugin in UE4. I have enabled the plugin, but the plugin is not showing up under "Plugins" in the project settings. I saw a post saying to add the /OculusVR/Materials to the "Additional Asset Directories to Cook". But there is no "/OculusVR/Materials" that can be selected, and I'm wondering if this is due to the plugin not working completely?5.2KViews1like5CommentsOculus Quest / Unreal 4 Media Player Material and /or Sequence Material
Has anyone had any luck getting a Media Player Material and/or a Sequence Material to work in the Oculus Quest? When I launch to the Quest all my materials show up except for the Media Player material. Any suggestions?5.1KViews0likes10CommentsCannot open HandsTrainSample because Engine modules are out of date.
I wanted to try out Hand Tracking with UE4, and I just did git clone the engine source from Oculus github, and build the engine following the instruction in the Oculus website. I cloned 1e09d2f (the latest one) from branch 4.25, which is release "oculus-4.25.3-release-1.51.0-v19.0" and built the engine using Visual Studio 2019. It worked fine, I could make a new project. I could also open HandSample project and it works great with Oculus Quest & Link. But I couldn't open HandsTrainSample. I built the engine and clicked Debug/Start a new instance in Visual Studio, then it opened up the editor. Then I chose the sample, but I couldn't open it. I also tried to open .uproject directly but it just says "The following modules are missing or build with a different engine version: HandsTrainSample Would you like to rebuild them now?" and if i go Yes, then I get Missing Modules error with the message "Engine modules are out of date, and cannot be compiled while the engine is running. Please build through your IDE." and I couldn't open it. I guess I have to find and fix errors in VS but I don't even know where I can get .sln file for this project so which I need to see errors in VS. I tried Generate Visual Studio project files from HandsTrainSample.uproject but .sln file wasn't generated in the same directory although I got no error. This is my first time to build the engine from source and I might misunderstand some stuff. I hope someone helps me with it.4.7KViews1like5Comments