How to use Joystick Emulator in Unity - unity3d

I'm developing the WebGL game need to be controlled by a joystick.
But I don't have a joystick device.
I don't have any idea which joystick emulator is the best for unity and how to use it.

You could maybe connect a playstation/xbox controller via a usb cable to your computer. Then you could it to see if your controller works on your computer by using this website: https://gamepad-tester.com
then look at this to see if it works, the different parts of the controller in the image should react to what you do with the controller in real life:

Related

Unity : How to test Oculus OVRinput through the editor? Workflow question

Here is my problem,
I'm using unity 2017.4.30 to develop an Oculus Go application. If anyone else has done this before you know that you can get Unity to build an APK and upload to the headset to test your software.
At the moment we are writing code to do with OVR Utilities, specifically OVRInput which basically is to do with the Oculus Go controller interacting with canvas or objects etc.
What I want to be able to do is test code we are writing in the editor and not have to upload the APK each time to test it. It seems some things like OVRCamera rig work in the editor fine but the controllers only show up when you run from the Oculus Go itself.
Any ideas how we could 'simulate' or 'virtualize' OVR controller in the editor so I can just click things with my mouse?
Thanks for reading,
If you do not want to write your own controller simulator, I'd suggest using the method oculus quest dev's have been using to quickly debug their game, which involves emulating a rift by using programs like ALVR or VirtualDesktop.
If set up correctly you'll be able to just press the play button in unity and instantly see your game on the oculus go.
The answer was the Oculus Link. When the Quest was connected to the PC via Link the Quest controllers where emulated inside unity. Problem solved.

Unity Steam VR launches incorrect

I've programmed a virtual reality game for the HTC Vive in Unity. I used Steam VR.
If I play the game on Unity, everything runs perfectly. It runs also perfectly if I build it. But if I copy my build to another computer, nothing's working.
It looks like this:top right corner
Does anyone no how to solve this?.
My Vive is setup correctly and other games are working just fine.
Thank you
Roman
Make sure before each build that OpenVR is set as first target in the player settings and not "None" (sometimes Unity changes it).
On the other computers, they should obviously have Steam and SteamVR installed
Since Steam workflow is to launch games from Steam Library,which launch SteamVR automaticly. make sure the SteamVR app is launched before launching your .exe.

How do I test the Air Tap gesture in Hololens Emulator?

I am building an Augmented Reality app for Hololens. I need to test the Air Tap Gesture, without deploying to the Hololens.
Is there any method to test the Air Tap functionality through the Hololens Emulator or the Holographic Emulation provided by Unity3D?
This will depend on your emulation environment:
Hololens Emulator (From Microsoft, allows multiple input devices)
Air tap gesture - Right-click the mouse, press the Enter key on your keyboard, or use the A button on an Xbox controller.
Windows Holographic Emulation (From Unity, requires game controller)
Perform a tap gesture with a
virtual hand - Left and right trigger buttons; the A button
Adding to the other answer. If you don't have a HoloLens this will not help but, if you do this will speed up development significantly.
On your HoloLens, download the Holographic Remoting App. Once it is downloaded open and run it and you will see your IP address for your HoloLens.
Now, go to the Unity editor -> Window tab -> Holographic Emulation. This will open a new window. For Emulation mode select remote device. Under Remote Machine enter the IP address. You can tinker with the other settings as you see fit.
Now with the Application running on your HoloLens click connect. Once you are connected the Unity editor will tell you and the HoloLens should go blank. Now when you press play on the editor the app will run on the HoloLens.
This does not download the app to your HoloLens and stops running when you stop the editor
If you are working in the Unity editor,
Shift + LMB (left-mouse-button) to simulate air-tap with the left
hand;
Space + LMB to simulate air-tap with the right hand.
Other useful points:
gaze can be controlled with the mouse by keeping RMB down. Also
q/w/e/a/s/d. (I know question was only about airtap, but they kind of
come together).
If you need to test typing some data with the standard keyboard, no
need to simulate airtap - just click with the mouse.

how to use the cardboard sdk for pc vr game?

so I want to create a vr game using unity3d and cardboard sdk for PC(windows), which I'll stream to my phone screen using kinoConsol. I created a simple scene when I build it for android,it works fine , I mean it shows the dual sbs camera(screen), but a windows build shows only one normal camera(screen).. is there a way I can use the cardboard sdk to show the sbs camera(screen) in a windows build ?? if not is there any thing else available to achieve this ?
Side by side is easy, just place two cameras where the eyes should be and change their viewport rect to half width. Now you have a side by side stereo renderer without any external library. Cardboard also adds some distortion to the lenses, but it is not that important to use it in your case.
Your second, and much bigger problem is the gyroscope - you have to somehow communicate the position of your headset to your unity app on your pc. This is not trivial and probably will require finding or building an persistent service on your android device that will send the orientation data to your desktop app.

Detecting when device in cardboard headset in Unity

I'm building a Unity Cardboard app, and would like to detect when the device is in the headset. The NFC in theory has this data, but it does not seem to be exposed in the API. I would like to have the app automatically enter VR mode when in the headset, without the user needing to toggle in and out of a VR mode.
Basically, I want Cardboard.vrModeEnabled to be automatically updated when you enter or exit a headset.
Is this possible? Thanks!
It used to be in the (non-Unity) SDK but was deprecated, for several reasons. For one, the NFC sensors on phones are placed in different places, so the detection was not uniformly reliable. For another, using the sensor this way drains battery quickly.
There are a lot of cardboard models on the market. a lot of them don't come with an NFC tag. so i wouldn't count on it.
Best approach for me is to start in VR mode, when the user touches the screen, disable VR mode for 10 seconds since the last touch and then go back to VR mode.