- 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?615Views0likes0CommentsHow 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 ! Regards746Views0likes1CommentHow 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.625Views0likes1CommentHow 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 all759Views0likes0CommentsLaunched 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.921Views0likes1CommentI 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