- 1.9KViews0likes1Comment
Excited about the new attestation but confused about how to set it up?
Hello, I recently looked into the new attestation feature and was excited to get started on implementing it into my quest game made with unity but couldn't figure out how to set it up. I'm not way too experienced with sending things back and forth from servers and stuff so bare with me. Could anyone by chance help me with setting up attestation in my game?608Views0likes0CommentsHow to restart scene when Oculus Rift headset is taken off?
Hello, I'm working on a VR project in Unity 2018.2.2f1 with Oculus Rift. Frirst i have created language selecion menu, by selecting desired language, app starts selected 360 video. I need to add a function that reloades back to the languge menu when user takes off the headset. How to do that? Thanks ! Regards742Views0likes1CommentHow to get a model of only the index finger?
In my app, I would like to enter a "selection mode" by pressing where you can raycast from your finger to an object and select points on the object. My issue is that it's annoying to select with your index finger on the standard hand because it's very easy to accidentally touch a trigger and contort the hand model and screw up the raycast direction. My question is, how can I get only the model of the normal, extended index finger? I want to press a button, enter "selection mode", and then have a static model of the index finger that can't be closed or contorted in any way.616Views0likes1CommentUnity scripting, read .jpg files
Hey! So I use Unity, C#. I never used java, and don't plan to, especially because Unity has a java class and java object for C# scripts. The problem is, I still struggle with writing a working code. I actually have 2 questions: how do I read file from a specific folder outside my app directory? I just want to create my own folder on the Oculus Go, and be able to read it, but I don't have permission, even if I set write permissions for SD card. It just says access to the path denied. What code should I use to access it? What do I need to set in Unity? How exactly do I do that, because obviously I know nothing about this... I mean I got to setting player settings to let me write to SD card but that's it. I don't even know if I have to do something on the Oculus Go or not. And the more important question: even if I use persistentDataPath, I can't read the bytes of the .jpg files. It simply doesn't happen. I try to use the same code for PC and android, for a few exceptions where I use #IF, but I would think that using the same method for loading a .jpg works. Looks like I was mistaken... My code for reading the .jpg is simple: WWW reader; byte[] fileData; Texture2D t; reader = new WWW(path + "/" + filename); t = new Texture2D(2, 2); fileData = reader.bytes; t.LoadImage(fileData); The path works, I make Oculus Go write it on a canvas, and it's what it's supposed to be. Then I get access denied when I try to even get a list of files. And if I use persistentDataPath, I can read .txt just fine. But when I try to load .jpgs, and try to make them appear, nothing happens. Can anyone help me? Also a third question, but it's related solely for Unity: there is a blue seam where the 360 image edges meet. How do I make it disappear? The image is fine, it works with other programs. And on the unity forums noone answers this question.739Views0likes1CommentOculus Rift + Unity Leaderboards
Greetings Everyone! My name is Mike and i have an issue. I'm working on my first Oculus Rift game (made with Unity, coded in c#) and am having some problems setting up a High-score board for my game. I've already created the board on the Oculus side i'm just not sure how to go about grabbing them in game. i don't think i'll have any issues displaying them once i know how to grab them. i was thinking the scoreboard would display the top ten scores globally, and to compare your scores to your friends. however i'm not a great coder and got lost pretty quickly on the oculus Leaderboard page. i'm not looking for a hand out with completed code or anything. i want to learn how to do this properly so I'm not back here on the next game lost and confused all over again. haha. for example the Leaderboards page says this: At a high level, there are two processes to implement when integrating leaderboards. Retrieve and Display Leaderboards - Display the current leaderboard state before a game begins. For example, ovr_Leaderboard_GetEntries for a native app, or Platform.Leaderboards.GetEntries for Unity. There are other methods you can use to get a subset of leaderboard entries based on input criteria. Update Leaderboard Entries - Write the results of the current game to your leaderboard. For example, ovr_Leaderboard_WriteEntry for a native app, or Platform.Leaderboards.WriteEntry for a Unity app. A user may only have one entry on each leaderboard, subsequent entries will overwrite the existing entry on the specified leaderboard. this makes sense. i'm using Oculus.Platform; and using Oculus.Platform.Models; at the top of my script so i type Leaderboards.GetEntries(LeaderboardName, *Int limit*,*Start At*); is int limit how many leader board spots to get and Start At the location in the leaderboard array? also how do i take that line of code and store it? so i can populate a highscore board list? any tips, pointers or help you guys and gals can offer would be GREATLY appreciated. Thanks for your time.1.5KViews1like2CommentsHow 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 all752Views0likes0CommentsLaunched a new Unity Gear VR Controller walk, grab, carry, and throw scripting addon today!:)
Hi boys and girls, Launched a new Gear VR Controller scripting product today on the GODHEAD VR shop on Square. This is a Unity scripting addon to be used with the Gear VR Controller and Oculus utilities package. This scripting addon makes it easy to add walking to the Gear VR Controller (variable speed walking in any direction by using the touch disc), and also makes it easy to add grabbing, carrying, and throwing of objects. (Yes, it's FUN throwing big weightless objects in a VERY safe environment!:) Here is a direct link to buy the scripting package: https://squareup.com/store/GODHEADVR/item/gear-vr-controller-easy-walk-grab-carry-and-throw-unity-scripting-addon-for-oculus-utilities-1 Here is a link to the shop, for those that are more comfortable seeing the item on the shop: https://squareup.com/store/GODHEADVR/ Note that this product is an addon for the Oculus utilities package supplied by Oculus. Also important to note that the by purchasing this item, the buyer understands that some basic C# scripting skill is highly recommended, although possibly not necessary if comfortable enough to at least drag and drop scripts in the right place and copy/paste into a script. If anybody is wondering why this isn't on the Unity Asset Store...that's basically because, after I clearly documented in the asset when I uploaded it to the Unity Asset Store that it's an addon for an Oculus product (and thus may not be legally alright to include an example scene that is an addon to Oculus scripts), the Unity employee apparently didn't read the document I included that clarified that and then said I should add an example scene. SO AFTER MORE THAN 20 DAYS OF WAITING for an idiotic reply from a seemingly lazy or inept Unity employee (alright, maybe it was simply an oversight and not employee laziness or employee ineptitude...MAAAAAAAYBE...), I obviously wasn't interested in waiting another 20 days for another potentially idiotic reply from a lazy employee. Because of that, I decided I will simply sell it on My company shop.916Views0likes1CommentI have a script to grab objects but it has alittle problem. can anyone check it?
Hello all. i have managed to get this from a tutorial and make it work for the oculus using OVRInput for the xbox buttons. It works for the most part, except if there are 2 or more objects within the range distance...it will grab all of them. HOw would i change it so that it only grabs the one I'm facing. using System.Collections; using System.Collections.Generic; using UnityEngine; public class GrabThrowObject : MonoBehaviour { public Transform player; public Transform playerCam; public float throwForce = 10; bool hasPlayer = false; bool beingCarried = false; public AudioClip[] soundToPlay; private AudioSource audio; public int dmg; private bool touched = false; // Use this for initialization void Start () { audio = GetComponent<AudioSource> (); } // Update is called once per frame void Update () { float dist = Vector3.Distance (gameObject.transform.position, player.position); if (dist <= 2.5f) { hasPlayer = true; Debug.Log ("Able to grab"); } else{ hasPlayer = false; } //Grab object. Bug is you can grab 2 or even 3 if in range if (hasPlayer && OVRInput.GetDown (OVRInput.Button.One) ) { //Press A button GetComponent<Rigidbody> ().isKinematic = true; transform.parent = playerCam; beingCarried = true; Debug.Log ("Pressed A to grab"); } if( beingCarried) { if (touched) { GetComponent<Rigidbody> ().isKinematic = false; transform.parent = null; touched = false; } if (OVRInput.GetDown (OVRInput.Button.Three ) ) {//Press X GetComponent<Rigidbody> ().isKinematic = false; transform.parent = null; beingCarried = false; GetComponent<Rigidbody> ().AddForce (playerCam.forward * throwForce); RandomAudio (); } else if(OVRInput.GetDown(OVRInput.Button.Two)){ //Press B button to drop object GetComponent<Rigidbody>().isKinematic = false; transform.parent = null; beingCarried = false; } } } void RandomAudio(){ if (audio.isPlaying) { return; } audio.clip = soundToPlay [Random.Range (0, soundToPlay.Length)]; audio.Play (); } void OnTriggerEnter(){ if (beingCarried) { touched = true; } } }1.9KViews0likes2Comments