New to VR development and relatively new to Unity. Anyone know a good/best practice way to find the game object for the left and right controllers?
You can find them in the Vive SDK package for Unity.
It does with some sample scenes and controller models are included.
If you want to know their destination path- just pause the game once SteamVR is up and running, select left or right controller and check model's mesh renderer component - it will point you directly to the place in project where mesh is saved.
Related
I'm new to developing in Unity and VR, and I just managed to load a scene with my custom model into the Quest 2. Now I want to grab an object with the XR Grab Interactable, but when I try to grab the object nothing will just happen. I did not adjust any settings.
I'm also not sure if I connect with the headset the right way because of this. I made a VR project in Unity and connect to my laptop via AirLink. When I press play the scene loads into the headset, so I hope that is just right.
I am useing a oculus quest with oculus link
I'm a unity vr game and I made a model for my vr hands and I heard to apply the model to your vr hands you just drag the model on to the xr Controller compment > Model Prefab. So I did that and then I tested my game. And my hands where far away from me and not linked to my controllers. Also my hands were really big to
Troubleshooting steps I took
I tried deleting the "Left hand" and "Right hand" In the Hiearchy and than made the left hand and right hand again and than added the xr controller compement and then dragged the hand model to the model prefab.
I tried delting the model and making a new one. This did not work
Here is my unity project if you want to take a look at my problem. https://drive.google.com/drive/folders/1XfQ1-_GGctwLSzYa2niW_6o1yJ_7IcQF?usp=sharing
I probabley did a really bad job explaing this. Sorry for any spelling errors
I am working on the Oculus project, The player character for my simulation in Unity. in which I have firstperson controller, I have created game object of player in which I put FPCamera as a child and character's body.
Issue: When I attach my oculus camera it detached from the body and with the Oculus headset movement, FPcamera act as a separate view from the body. the body does not rotate and remain static even though FPcamera is moving according to the headset. However it works fine if I disable oculus and move the character with the mouse, I can see my body and move left right everything with all animations.
I have the following link for the oculus controllers integrations in my project
https://assetstore.unity.com/packages/tools/integration/oculus-integration-82022 (Oculus integration)
here is a link which I have to achieve for my project, my FirstPerson should be like this in Oculus. you can see that the movement is with accuracy according to its headset movements
https://www.youtube.com/watch?v=7GpxsI-Tag
Note: I am using Unity 2017, there is no crash report in the project
First of all send the correct link for the video please.
When i create a new scene and I want to implementate the oculus player,cameras and hands I make this:
Find "OVRplayercontroller" prefab and drag to the scene
Find "CustomHandLeft" and "CustomHandRight" and drag to the scene
Go to the child object in OVRplayercontroller>OVRcameraRig>TrackingSpace
Then selec the 2 hands
And drag the TrackingSpace object to the "Parent transform" property in the OVRGrabber script in the 2 hands
Hope it helps you
You can use "OVRPlayercontroler"
I want to add label of text on my controller of HTC VIVE in Unity like that but after many research on internet, I don't find how to do.
Someone can help me ?
thank you !
Steps to create text on controller :-
1.Drag camera rig prefab in your scene.
2.Attached Player script of stream VR plugin on camera rig.
3.Attached Hand script on both controllers.
4.Create a empty game object as a child of each controller ,set their local positions at (0,0,0) .Now add script ControllerButtonhints on both. Drag controllerbuttonhints material on controller material ,set any flash color,drag prefab controllertexthint from stream VR prefabs.
5.In Hand scripts drag other hand i.e. in left controller drag right controller and in right vice versa , set starting hand type is Any for both controller.,drag controller prefab as blank controller prefab in stream VR .
In player script ,drag camera rig to tracking origin transform, add camera eye as hmd transforms ,add both controllers in hands array,leave other things none and untick allowtoggleto2d also.
7.Last step is comment line no 279 -288 as we don't required for our current purpose.
Although my English is not so good but may be it help you.
Thanks,
I am making a first-person game using Unity and Vuforia. What I'm trying to achieve is that the user can have a marker attached on an object that can be held in his hand (a bottle, a book, or toy). So when he plays the game, he can hold the object in his hand, have the object facing the webcam, and move or rotate the object to control the first person character in Unity, e.g., tilt the marker-attached bottle in physical world so the first person character moves forward in Unity's virtual world. ps. by virtual world I mean just a basic first-person character walking around in a room, not the kind of VR that involves Oculus Rift.
I just played around with Vuforia. The good thing is I can choose my own image as the marker (looks like not every marker-based Unity plug-in can do this). But with Vuforia, can I create a virtual environment that's not showing the webcam's view? I did a basic Vuforia + Unity tutorial that only shows what the webcam captures and overlays a virtual cube on the detected marker. Summary of what I need is: not showing the webcam's view but still have the webcam functioning that it can capture the marker and I can use its position/rotation. In a way you can say I am just using the marker+webcam combo as a sensor used to control my virtual world activity.
Thanks!
From what I get it appears you want to use your marker as a target object to control motion in AR..
You'll have to build the functionality in Unity only as to what you want it to do specifically according to your set gameplay..
For example if you want a virtual dog to follow a target object, one easy way to do it is to provide an offset between the marker and the game Object and play a walking/running animation.
So it will appear as if the object is always following the marker, whereas in reality it is playing same animation at a constant distance.
As far as importing the marker is concerned.. It is no different than what you must have done with your cube..
In your Vuforia account Dev Portal:
Download the Vuforia SDK and import in your Unity asset folder.
Go to Liscense Manager under Develop tab and add a Liscense Key.
Now go to the Target Manager and add your images in the Databse which you want as target. (make sure the image quality is good for it to work prperly)
Now download the database and import it in your Assets folder in Unity.
Now go to your Liscense Manager again and copy your Liscense key and Open Vuforia Configuration under Vuforia Behaviour (Script) when you click on AR Camera, you'll find a dialog box there, paste this key there.
Save the build and run your game in Unity and bring the marker in front of the Webcam and it should work properly.
Hope this helps.