(Unity) OVRPlayerController- How to get OVRPlayerController to move with OVRCameraRig
I'm working off the standard OVRPlayerController, which has an OVRCameraRig as its child. This is a game where I need thumbstick locomotion (which the OVRPlayerControllerProvides), but I also need roomscale movement. In other words, I need to make sure that when the player moves physically, his in game avatar should also move. Currently whats happening is that when the player moves physically, the OVRcameraRig moves with him, but the parent OVRPlayerContoller does not move. This is an issue because I need my OVRPlayerController to move with my player at all times for proper collision tracking and targeting by Hostile AI. What is the best way to achieve this? Iv'e tried a few ways to make it work but wondering what the cleanest solution is. I'll also need hand tracking for this game. Perhaps I should simply use the AvatarSDK standard avatar and make it a child of a Character Controller for thumb stick movement? thanks for the help!21KViews1like11CommentsDisabling OVRPlugin doesn't work properly
I'm working on a project for both oculus (OculusGo and GearVR) and cardboard platforms. When I build for oculus paltform I can run the app with no problems. When I build for cardboard I have no problem, but after installing, the icon doesn't appear in the Android app page, but only in the Cardboard application. In addition, if I run it from there it starts as GearVR app, showing the message which says to insert the smartphone in the GearVR. I'm using Unity 2019.2.14f1 now, but this problem appears when update OVR integration SDK from v1.39 to any newer version (1.40, 1.41, 1.42, 1.43), regardless the unity version. I didn't change any settings, just update OVR integration SDK from asset store, importing just Platform and VR folders, since I'm not using other features. Before importing the SDK I first remove the old one. My settings for Cardboard build are the following: - OVR plugins disabled - Oculus -> Tools -> "User required project settings" is unchecked - XR settings -> "Virtual reality SDKs" contains just Cardboard Are there any setting I'm missing?934Views0likes0CommentsHow To Use Multiple Android Surface's In Unity Using OVR
Im want to play multiple players (ExoPlayer) in my Unity VR app. Single player I am already done. But how can I create multiple players (Android Surface's actually). I know about this functions: OVR_Media_Surface_Init(); OVR_Media_Surface_SetEventBase(int eventBase); OVR_Media_Surface_GetObject(); OVR_Media_Surface_GetNativeTexture(); OVR_Media_Surface_SetTextureParms(int texWidth, int texHeight); But OVR_Media_Surface_GetObject return the same surface for all players.748Views1like0CommentsHow to Create an Animated Loading Screen with OVR Overlay
Unity Version: 2018.3.6f1 Oculus Utilities: 1.4 Hi all! I am trying to create an animated loading screen with render textures and OVR Overlay, but have run into the following error and do not know how to proceed: These are the steps I have taken: 1. Create a render texture. 2. Create a video player game object in my scene and link it to my render texture. (I have tested that the render texture is working.) 3. Create a game object with an OVR Overlay. (It is enabled in the scene.) I believe I have followed the instructions here: https://developer.oculus.com/documentation/unity/latest/concepts/unity-ovroverlay/?locale=en_US Has anyone else been able to successfully render a film or abu in this way?1.8KViews0likes0Comments[Bug] Platform - Creating Invalid Requests causes CallbackRunner to silently consume Notifications
Unity 2018.4.3f1 | Oculus Unity Integration 1.38 Hi there, I'm just posting this to identify a bug I spent a while trying to diagnose that ate up my past week. I'm hoping that if anyone else has this issue, this might help them, and that proper steps may be taken to resolve this for newcomers using the Unity Integration tools for the first time. Here's the issue: When making a request that is "invalid", the Unity integration sometimes returns a proper request, but it has Request ID of 0. Any time that this happens, if I register a callback for it, Platform Notifications will be eaten, which may cause random, problematic bugs. Why does this happen? Oculus's Callback.cs contains two separate dictionaries mapping callbacks. In one, you have callbacks for regular repeating things - Room Data Updates, Invite Notifications, Voip Connectivity Changes, etc. In the other, you have mappings of Request IDs to callbacks, where Request IDs are sequential integers that are incremented. When a message is popped off of the ovr message stack, it goes into Callback.cs - HandleMessage. If there's a callback in the `requestIDsToCallbacks` dictionary, it uses it. Otherwise, it tries to see if it was registered in the notification dictionary. The problem is, if you EVER register a callback for a Request with ID 0, Notifications will be eaten up and error. This is because all notifications have Request ID = 0, which means that, TECHNICALLY, there is a callback waiting for Request 0, so that notification will disappear. ------------------------------------------------------ Here's an example. I have a project with a bunch of social properties around Rooms. I want to change the Room datastore to reflect certain environment changes. I can use the UpdateDataStore/ovr_Room_UpdateDataStore call to update my stuff. Well, it turns out that UpdateDataStore returns a Request, and I can schedule a callback for it, to know if the call succeeded or not. So let's say I have part of a call where I want to add new key/value pair to the room. Here's how the final call would look. ... data[key] = value; Rooms.UpdateDataStore(Room.ID, data).OnSuccess("Rooms.UpdateDataStore", (room) => { Debug.Log($"[Room] Successfully updated datastore on room ({room.ID}) with [{key}] | [{value}]"); }); ^ in the code above, OnSuccess is just an extension method that wraps around the default OnComplete: public static void OnSuccess<T>(this Request<T> request, string actionName = null, Action<T> callback) { request.OnComplete((message) => { if(message.IsError) { if(string.IsNullOrEmpty(actionName)) actionName = "Unknown Oculus Request"; var error = message.GetError(); error.Log(actionName); // uses my own extension method for logging prettily return; } else { callback(message.Data); } }); } Either way, that's not important. But imagine that I have this nice wrapper around OnComplete that logs in case of failure, and calls my callback in case of a success. This works most of the time. But... let's say that I am in a Solo Room. In that case, calling UpdateDataStore works just fine. It returns a Request, with Request ID 0. My code has been working just fine, and I schedule my callback. But... apparently, it was an error. What's the point of updating the datastore in a solo room if there's nobody to hear it? And because that request was never meant to happen, it doesn't return a proper Request that will return an Error in the Message. It just... is scheduled as Request ID 0, and it will never, ever, ever pop off the stack. It just sits there. Now, when a notification comes in - any notification at all, they all technically have Request ID 0. They will attempt to attempt to fire the callback for my "successfully updated the datastore" but it will error out during the cast, and log an error on line 142 of Callback.cs (Debug.LogError("Unable to handle message: ")... as ------------------------- Repro: 1. Schedule a notification callback for some regular repeating notification. 2. Call UpdateDataStore in a solo room and schedule the OnComplete callback. 3. The callback will never fire. 4. When the next Notification that comes in, it will try to fire that callback and error out, meaning that your notification callback will not get called. -------------------------- I use UpdateDataStore here as an example, but I've seen it happen in a number of other cases, for example, if you call Rooms.Get(currentRoomId).OnComplete(...), where your currentRoomId is 0 (solo room), it will return a proper Request with RequestID = 0 , that will never get called, and trigger this. I had some logic that refreshed the current room in certain conditions, and noticed that it was causing the same issue. Clearly, I should've used GetCurrent, but the point still stands, that I would have rather gotten an error in the callback, rather than a silent no-op that never triggers, and causes me to have intermittent broken failures. The fix on the Oculus side should be pretty easy. You guys need to either: a) Handle the case where the Request ID is 0 and not schedule it. b) Process notifications before processing requests in HandleMessage c) Not return requests with id = 0, but schedule proper requests with an error so that people can know what they are doing wrong. d) Change Notifications to have RequestId = -1 (which won't work since you're using ulongs for the request ID). e) Force all users to check every request that ever triggers to see if it is 0, and not actually schedule the callback in that case. (What I did on my end using an extension method). TLDR: As it currently stands, any time the Oculus Platform API calls returns a Request/Request<T> with an ID of 0, the next notification message will be swallowed up and not fired in the application which will cause indeterminate errors. I've handled it on my end, but this might cause tons of problems for other people running into intermittent notification disappearances.918Views3likes0CommentsHow to instantiate a grabbable object at runtime in Unity?
Hi everyone, Right now I have an obj file in Unity. I have a script that adds a Collider component, a Rigidbody component, and finally an OVRGrabbable component to the object. I need to add these components at runtime because eventually I will be producing procedural meshes in a script at runtime, and I need these procedural meshes to be grabbable. My problem is that the OVRGrabbable script does not recognize the added collider as a grab point when the collider is added at runtime. I thought that it would be enough to add the collider before the OVRGrabbable in my script, but no dice. I tried attaching the collider in an Awake function and then the OVRGrabbable in the Start function, but that didn't work either. Additionally, I cannot add it in script because the grabPoints array is read-only. Here is my code: public class AddVRComponents : MonoBehaviour { void Start () { public bool freeMoving = false; public bool useGravity = false; collide = gameObject.AddComponent<BoxCollider>(); Rigidbody rB = gameObject.AddComponent<Rigidbody>(); if (!freeMoving) { rB.drag = Mathf.Infinity; rB.angularDrag = Mathf.Infinity; } if (!useGravity) { rB.useGravity = false; } OVRGrabbable grab = gameObject.AddComponent<OVRGrabbable>(); Collider[] newGrabPoints = new Collider[1]; newGrabPoints[0] = collide; grab.enabled = true; grab.grabPoints = newGrabPoints; } } This obviously does not work because the final line produces the error that grab.grabPoints is read-only. I know that it can be done because if I run my program and then in the editor manually drag my collider into the grab points field of the OVRGrabbable component, the object can be grabbed. How can I get the OVRGrabbable script to recognize my collider? Thank you all762Views0likes0Comments[Unity][Rift]LocalAvatar not showing in app submission build
Hi There, I've submitted the app to the store(Currently still under review). For some reason when I downloaded from the oculus desktop app, my local avatar is not showing and controller as well. I developed the app in Unity v2017.3.1f1, Oculus Utilities v1.25.1, OVRPlugin v1.25.0, SDK v1.26.0 I have tried the follow: -Included the 3+ shaders and build in x86_x64. -Added the platform manager code. using UnityEngine; using Oculus.Avatar; using Oculus.Platform; using Oculus.Platform.Models; using System.Collections; public class PlatformManager : MonoBehaviour { public OvrAvatar myAvatar; void Awake () { Oculus.Platform.Core.Initialize(); Oculus.Platform.Users.GetLoggedInUser().OnComplete(GetLoggedInUserCallback); Oculus.Platform.Request.RunCallbacks(); //avoids race condition with OvrAvatar.cs Start(). } private void GetLoggedInUserCallback(Message message) { if (!message.IsError) { myAvatar.oculusUserID = message.Data.ID; } } } -added an Oculus App ID in both the Oculus Platform and the Oculus Avatars settings. -Provided test accounts on Unity Editor And yet it still not showing on the submission application. See it does show the ID number on Unity editor and shows the correct avatar. On local build it turns the default blue avatar. On Submitted app both controllers and avatar disappear. I am confused and lost now, looking everywhere doesn't help me in anything. Please help. Thank you.763Views0likes1CommentHow to set custom position and orientation to Oculus SDK in Unity project for GearVR?
Hi, I have my own tracking system: positional tracking + orientation. And I have to use them both. I have not found a way to set custom orientation to OVR camera in Unity3D engine! Any attempt to rewrite camera orientation in scripts leads to wobbling or incorrect rendering. Is there any way to completly ignore GearVR gyroscope tracking and use custom?648Views0likes1CommentIssue Uploading Gear Vr Apk - Ovr Platform Util
Hi everyone, I'm having this Issue, it's mean "ERROR: There was a problem processing the file you uploaded. Try again later". Anyone knows why this issue is occurring?.It appear after repeat what seems the same process for several times The error appeared after I change de apk name, beacuse always came the following error: "ERROR: An APK with this package name and version code already exists. Please increment the version code and then resubmit you r update." The apk is from Unity 3d. I hope somebody can help me with this, :( PD: For future reference for the internet search engines I leave the original text in spanish "ERROR: Se produjo un problema al procesar el archivo que subiste. Vuelve a intentarlo más tarde" . and "Enviando a CDN <5/5>"1.1KViews0likes4Comments