Giter VIP home page Giter VIP logo

steamvr_unity_plugin's Introduction

SteamVR Unity Plugin

Valve maintains a Unity plugin to smoothly interface SteamVR with Unity. With SteamVR developers can target one API that all the popular VR headsets can connect to. The modern SteamVR Unity Plugin manages three main things for developers: loading 3d models for VR controllers, handling input from those controllers, and estimating what your hand looks like while using those controllers. On top of managing those things we have an Interaction System example to help get your VR application off the ground. Providing concrete examples of interacting with the virtual world and our APIs.

Requirements

The SteamVR runtime must be installed. This can be downloaded from Steam under the Tools category. Or by clicking here. As developers we strongly recommend that you opt-in to SteamVR beta so you can test new features and verify your application works with the latest versions of SteamVR.

  • This version of the SteamVR Unity Plugin is compatible and has been tested with Unity versions 5.4 - 2019.1

Documentation

Documentation can be found online here: https://valvesoftware.github.io/steamvr_unity_plugin/

Quick Start

  • Follow the Quickstart guide on this site

  • If you want to explore the Interaction System scene you'll need to open the SteamVR Input window (under the Window Menu), click yes to copy example jsons, then click Save and Generate to create input actions.

  • For the most simple example of VR with tracked controllers see the sample scene at /SteamVR/Simple Sample

  • For a more extensive example including picking up, throwing objects, and animated hands see the Interaction System example at /SteamVR/Interaction System/Samples/Interactions_Example

Support

If you're having trouble with the plugin the best place to discuss issues is our github here: https://github.com/ValveSoftware/steamvr_unity_plugin/issues/

If you'd like to discuss features, post guides, and give general feedback please post on the steam forum here: https://steamcommunity.com/app/250820/discussions/7/

steamvr_unity_plugin's People

Contributors

aaronleiby avatar aleiby avatar jeremyselan avatar zite avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

steamvr_unity_plugin's Issues

HMD InverseTransformPoint reports invalid negative values

Reference a controller relative to the HMD using transform.InverseTransformPoint (part of SteamVR_Utils), then move the controller in any negative direction on x/y/z planes and monitor the values - they will report correct until around -0.2, then jump to -1.0 to around -1.2, then continue correctly from -0.3 on. Is this a known issue? A quick glance didn't show a duplicate issue. plugin v1.2.

Asset Subdirectory only - without the project files

Hy,

nice job so far, thanks for publishing and maintaining this package. :)

Is there a reason why we need the Unity project folders (Assets & Project Settings)?

What would speak against just using the SteamVR directory?
So it could be used as a git submodule, which is not possible with the current structure of the repository!?

kind regards
M

How to adjust the camera moving scale to the real world in Unity?

Hi, I try to make the feedback of the camera movement larger in Unity because my movement space is quite small and I hope that with a little movement in real world, I can have a larger movement in Unity than the default scale. but I did not find any way to get the camera position offset parameter in Unity.
I read the source codes and find that it seems that the script "steamVR_trackedObject" in camera is redundant, while the "steamVR_camera" will add the camera into "steamVR_render" and disable the "steamVR_trackedObject". And the steamVR_render will directly render the frame of the camera so that it is unable to adjust the camera movement. Maybe am I wrong?
Anyway, my problem is that how I can adjust the steamVR_camera's move scale to the real world. I would be very appreciate if you can help me out. Thanks!

SteamVR_LoadLevel.cs overlay sorting issue

Problem:
In the SteamVR_LoadLevel.cs script, the loadingScreen texture overlay seems to always sort over top of the progressBarEmpty/progressBarFull texture overlay. I do see the progress image fade in, then fade out immediately after. Loading takes place then, when the scene is loaded, it shows up again for a split second before I'm dumped into the loaded scene.

My Solution:
I solved this by writing
overlay.SetOverlaySortOrder(handle, orderNum);
in the GetOverlayHandle() function next to where it's setting the alpha, incrementing the orderNum so each call would put the subsequent overlays on top of the one before it. Seems to show up fine after adding that.

Here are the properties I've set up on the script in case it somehow turns out that I'm the source of my own problem :)
Screenshot

Hope that helps!

Unity Oculus No Controllers

Can't get any hand controllers to appear in Unity 2017 with an Oculus. When you hit run controllers become greyed out and are not visible.

One pad only is not tracked

With the version 1.2.2 of the plugin if I have only one pad connected, the pad is not tracked and no controls are available. Whereas if I have two pads it works fine.

CANVAS LAGS BEHIND WHEN ATTACHED TO A CONTROLLER

Please visit:
https://issuetracker.unity3d.com/issues/vr-canvas-lags-behind-when-attached-to-a-controller

[VR] CANVAS LAGS BEHIND WHEN ATTACHED TO A CONTROLLER
VR-Jul 16, 2016-Priority: 7Not yet prioritized for a release-Severity: 3Workaround is possible
Steps to reproduce:

  1. Download and open attached project "FloatingCanvas.zip"
  2. Make sure HTC Vive is set up and connected
  3. Make sure VR Mode is on in Player Settings\
  4. Play the project

Actual result: Left hand has a cube and canvas as child object. Moving hand in space you can see that the canvas lags behind the cube and the controller

Expected: No dragging/lagging behind

Tested and reproduced on:
Windows 10
Unity 5.4.0b22, 5.4.0f1

Workaround:

A workaround is to modify the SteamVR_UpdatePoses.cs script.. change OnPreCull to LateUpdate. This will make the controllers line up with the UI but they will be slightly more latent, so it is only recommended updating in LateUpdate when you need UI attached to the controllers.

A proper fix for this is scheduled for 5.5 where the controllers will be updated before the UI, bringing latency down.

Editor Null exception adding camera rig to scene

Just trying the SteamVR package on the Linux Editor. Imported the package through the asset store. As soon as I add the camera rig to the scene the editor crashes:

System details:
Unity: 5.6.3xf1Linux
OS: Ubuntu Xenial (16.04)
SteamVR runtime is not installed (on purpose)

Tried Unity 2017.3.0b1, and Debian Testing as well, same result.

Editor.log:

(Filename: Assets/SteamVR/Scripts/SteamVR_GameView.cs Line: 14)

Receiving unhandled NULL exception
#0  0x007ffd92766c40 in funlockfile
#1  0x007ffd927672e0 in _dl_find_dso_for_object
#2  0x007ffd927672f0 in _dl_rtld_di_serinfo
#3  0x007ffd92767440 in dlerror
#4  0x007ffd92767460 in dlclose
#5  0x007ffd92767470 in VR_InitInternal
#6  0x007ffd927674b0 in (Unknown)
#7  0x007ffd927674c0 in (Unknown)
#8  0x007ffd927674d0 in (Unknown)
#9  0x007ffd927674e0 in (Unknown)
#10 0x007ffd927674f0 in (Unknown)
#11 0x007ffd92767500 in (Unknown)
#12 0x007ffd92767510 in (Unknown)
#13 0x007ffd92767520 in mono_set_defaults
#14 0x007ffd92767900 in mono_runtime_invoke
#15 0x007ffd92767930 in scripting_method_invoke(ScriptingMethodPtr, Scripti
ngObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
#16 0x007ffd92767970 in ScriptingInvocation::Invoke(ScriptingExceptionPtr*,
 bool)
#17 0x007ffd927679a0 in MonoBehaviour::CallMethodIfAvailable(int)
#18 0x007ffd92767b30 in void BaseBehaviourManager::CommonUpdate<BehaviourMa
nager>()
#19 0x007ffd92767b90 in BehaviourManager::Update()
#20 0x007ffd92767bb0 in PlayerLoop()
#21 0x007ffd92767bd0 in Application::UpdateScene(bool)
#22 0x007ffd92767c50 in Application::UpdateSceneIfNeeded()
#23 0x007ffd92767c70 in Application::TickTimer()
#24 0x007ffd92767e80 in MainMessageIteration(void*)
#25 0x007ffd92767e90 in g_source_get_time
#26 0x007ffd92767eb0 in g_main_context_dispatch
#27 0x007ffd92767f40 in g_main_context_dispatch
#28 0x007ffd92767fa0 in g_main_loop_run
#29 0x007ffd92767fd0 in gtk_main
#30 0x007ffd92768050 in main
#31 0x007ffd92768960 in __libc_start_main
#32 0x007ffd92768a20 in _start

1.2.1 Crashes in Unity 5.6 when trying to add CameraRig prefab to scene (Linux/Ubuntu)

In Unity 5.6.0b8 on Ubuntu 16.10, Adding the CameraRig Prefab to my scene causes unity to Crash. Unity developer Tak said it was something related to the OpenVR file openvr_api.cs.

See my original post in the Unity forums for Tak's work-around code: https://forum.unity3d.com/threads/5-6-0b8-crashes-while-trying-to-add-steamvr-plugin-camerarig-prefab-video-included.457907/

Expected behavior would be to add the CameraRig prefab into scene on Linux without it crashing the Unity 3D editor.

When launching a Unreal app from a Unity app I get a hung compositor

I am trying to develop my own VR program launcher in Unity. When I launch a Unity app via SteamVR_LoadLevel.cs all works fine for the launch. When I try to run an Unreal app it mostly works, I can see the app on desktop responding to the headset and I hear audio but seem to be stuck in compositor limbo land. I have to reboot the headset in order to recover.

Any suggestions on how to debug this one?

No controllers using the latest SteamVR with 2017.1

I did the following:

  1. Installed the latest Unity 2017.1 release candidate.
  2. Imported the latest version of SteamVR (v1.2.2) via the asset store.
  3. Per the SteamVR Quickstart PDF, I clicked on MainCamera, added a "Steam VR_Camera" script, and then clicked Expand.
  4. This didn't work at all (moving the headset did nothing), so I went to Player Settings > Other Settings, checked "Virtual Reality Supported" and added the OpenVR SDK.

That got the headset working, but now the controllers don't show up.

example scene cannot detect controller in Unity 5.6

  1. Open unity 5.6.0f3
  2. Create new project
  3. Import steamVR plugin from asset store
  4. Open example scene
  5. Play game
  6. Game cannot detect controller

I test in unity 5.5.0f3, it works. Maybe this is not my hardware problem.

Environment

  • unity version : unity 5.6.0f3
  • steamvr plugin : 1.2.1 (from unity asset store)

SteamVR_RenderModel doesn't initialise if Time.timescale is 0

We have our game paused on start to show a menu, while in the background the game (and thus VR components) initialise.

With time.timeScale = 0, it breaks the spawning of the controllers. They track correctly, however the models do not appear in the world.

We tracked down the cause to the use of yield return new WaitForSeconds(0.1f); in SteamVR_RenderModel.SetModelAsync. Changing this to WaitForSecondsRealtime fixed the issue.

Motion not detected in Unity 5.6

Hi,

tested with Oculus Rift + Touch and HTC Vive.
In both cases controllers on the SteamVR camera rig are always disabled. Controllers are still shown in the SteamVR window.

Cannot set Layer and Tag for Created Assets

I need to keep my Steam-VR controllers and several other ui-related elements on particular layers, so they aren't caught in some computations.

The trouble is that there isn't anywhere to specify what layer or tag you'd like your SteamVR-created GameObjects to appear on.

Currently, I'm adding '.tag = gameObject.tag' and '.layer = gameobject.layer' in every place that you instantiate a control. This way, I can place the objects on other layers - and I have the flexibility to split the left and right hands, if I feel it's needed.

It would be good to see this integrated into the code-base.

SteamVR_UpdatePoses script still required in Unity's 5.6 Release

Unity has officially released Unity 5.6 (and 5.6.1!) and it is no longer in beta. However, it still requires you to add the SteamVR_UpdatePoses script to the main camera.

This has officially been classified as Won't Fix by the Unity Team so it is probably time to merge Pull Request #14 so that people do not need to continue to use a workaround to have this work out of the box with the latest version of Unity.

Thanks!

Teleporting to New Scene causes Teleport to break

When teleporting to a new scene through 'TeleportPoint.cs TeleportToScene()' using basic unity scene switch code, the below error is thrown when trying to teleport once more.

MissingReferenceException: The object of type 'TeleportPoint' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. Valve.VR.InteractionSystem.TeleportPoint.ShouldActivate (Vector3 playerPosition) (at Assets/SteamVR/InteractionSystem/Teleport/Scripts/TeleportPoint.cs:107) Valve.VR.InteractionSystem.Teleport.ShowPointer (Valve.VR.InteractionSystem.Hand newPointerHand, Valve.VR.InteractionSystem.Hand oldPointerHand) (at Assets/SteamVR/InteractionSystem/Teleport/Scripts/Teleport.cs:689) Valve.VR.InteractionSystem.Teleport.Update () (at Assets/SteamVR/InteractionSystem/Teleport/Scripts/Teleport.cs:266)

In this case, the scene is loaded and switched to, however the player, the teleport points, and everything VR related is in a gameobject which won't destroy with scene switch.

Unity 2017 F3 Error on loading camera rig

Get this error on windows when I drop in the camera rig prefab:

Failed to load IVRRenderModels interface version IVRRenderModels_005 UnityEngine.Debug:LogError(Object) RenderModelInterfaceHolder:get_instance() (at Assets/SteamVR/Scripts/SteamVR_RenderModel.cs:90) SteamVR_RenderModel:SetModel(String) (at Assets/SteamVR/Scripts/SteamVR_RenderModel.cs:281) SteamVR_RenderModel:Update() (at Assets/SteamVR/Scripts/SteamVR_RenderModel.cs:674)

OpenVR C# API crashes on compositor Submit after reinitialization

I have recently updated a demo project to the new OpenVR C# 1.2.1 (OpenVR 1.0.6) and I am now seeing memory access violations when calling compositor Submit but ONLY after reinitializing the system a second time on the same process.

Specifically, after the first Init things work fine and I can render everything and work with the system exactly as before. However, eventually I need to call Shutdown (for system cleanup reasons).

Now at some point in the demo logic I need to initialize the VR system again (i.e. by calling Init a second time), but this time I will get a memory access violation immediately as soon as I call Submit on the compositor.

Did anything change regarding the behavior of Shutdown that might be causing this behavior? I would say this looks like some dangling pointer that got left out somewhere and doesn't survive the Shutdown call.

Interestingly, all other API calls work exactly as before and the system is totally fine as long as I don't call Shutdown: only Submit crashes with a memory violation. Also, if I use the exact same code with the previous API, I can call Init/Shutdown as many times as I want on the same headset (same firmware), so it looks like something specific to the API and not related to some hardware/driver update, etc.

Interaction system player prefab hands stutter/flicker

I am seeing stuttering/flickering of the controllers when using the Interaction System Player prefab.
In a empty Unity project and a scene that just contains the Player prefab. Making large horizontal movements (with the controllers) back and forth you will see the stuttering, it's also pretty clear to see with large arcs. The stutter looks like the controller is rendering at the previous frame position.
I do not see similar stuttering/flickers using the CameraRig prefab and I've also had another test this so I don't think it is a hardware issue.
Using: Unity 5.5 & GTX970

Interactions_Example: Selecting BowPickup within hierarchy crashes Unity editor

At the bottom of ItemPackageSpawner.cs, ItemPackageSpawnerEditor has this line within it's OnInspectorGUI:

script.itemPackage = script._itemPackage;

But because itemPackage has a setter which calls CreatePreviewObject(), When in the editor, a bunch of LongbowPreviews keep getting added (There is already one in the scene's hierarchy by default).

I just removed the whole ItemPackageSpawnerEditor and it fixes the issue. ItemPackageSpawnerEditor adds no editor functionality anyway.. I'm still confused why CreatePreviewObject() is called within the setter like that, but at least I can continue my digging around. Thanks for sharing all this by the way.

Cannot See Vive Controllers in VR with 1.2.3

I have tried Unity versions 5.5.0f3, 5.5.3f1, 5.5.4p4, 5.6.1f1, and 2017.1.1f1 with version 1.2.3 of the SteamVR plugin and none will show the controllers. All I'm doing is removing the Main Camera from an empty project, and dragging in the [CameraRig and [SteamVR] prefab into the scene and playing the scene.

The only version I can get working (see the controllers in VR) is 5.5.0f3 with a copy of SteamVR 1.2.0 plugin that I have from an old project.

Is there something different that has to be done for 1.2.3 to work?

MR failed to change FOV in Unity 5.6

When using MR with Unity 5.6, the FOV of the third-person view is abnormally large and unresponsive to the value written in externalcamera.cfg. The error message says: "Cannot set field of view on this camera while VR is enabled."

Example scene for v1.0.12 has controllers/lighthouses fixed at (0, 0, 0)

When running the example scene the headset is moving but no controllers/lighthouses appear in the correct places. They are fixed at (0, 0, 0). The controllers are disabled when running.

Using:
SteamVR build 9 jan 19.33 (1515522829)
Unity 5.6.3p4
SteamVR Plugin 1.2.3

In Unity 2017.3.0f3 it works though.

Visual Studio Warnings and SteamVR Unity Plugin (Unused fields)

The field 'AfterTimer_Component.go' is never used [...]SteamVR\InteractionSystem\Core\Scripts\Util.cs
The field 'AfterTimer_Component.timer' is never used [...]SteamVR\InteractionSystem\Core\Scripts\Util.cs
The field 'ArrowHand.arrowRigidbody' is never used [...]SteamVR\InteractionSystem\Longbow\Scripts\ArrowHand.cs
The field 'BalloonColliders.ColliderData.localPosition' is never used [...]SteamVR\InteractionSystem\Longbow\Scripts\BalloonColliders.cs
The field 'BalloonColliders.ColliderData.localRotation' is never used [...]SteamVR\InteractionSystem\Longbow\Scripts\BalloonColliders.cs
The field 'ItemPackageSpawner.prevItemPackage' is never used [...]SteamVR\InteractionSystem\Core\Scripts\ItemPackageSpawner.cs
The field 'Longbow.prevArrowHandItemPackage' is never used [...]SteamVR\InteractionSystem\Longbow\Scripts\Longbow.cs
The field 'SeeThru.hand' is never used [...]SteamVR\InteractionSystem\Core\Scripts\SeeThru.cs
The field 'SteamVR_Settings.toggleState' is never used .Editor [...]SteamVR\Editor\SteamVR_Settings.cs

Allow to turn off auto-enable-VR behavior

Currently the SteamVR plugin forces VR to be enabled in the Player settings. I'd like to regain the option to run a project without VR enabled, even if it contains the SteamVR plugin.

In my case, I often develop certain functionalities with a plain camera and cursor, this allows me to work on the go or to avoid the HMD for tasks that don't require it.

Companion window resolution/aspect ratio problem when rendering two windows on two screens of different sizes.

I'm experiencing strange behaviours of the companion window while building an Unity VR-application with an additional desktop UI. What I want to have: An UI on the first display, the view of the VR Player on the second.
When the second display is smaller than the first display, the companion window gets horizontally stretched. When I Switch both windows from one display to another, the companion window works properly. When the first display is smaller than the second display, the companion window just uses a small portion of the second display. I prepared a test project which reproduces the error.

Companion window on the right is stretched
unbenannt
After switching window to the left display in runtime it's rendering correctly
unbenannt2

MultipleDisplayBug.zip

Not Able to Set The Properties from OpenVR.Settings.Setbool();

In Unity 5.5.0 and SteamVR plugin v1.2.1 i tried to set the camera section property via OpenVR.Settings.SetBool (OpenVR.k_pch_Camera_Section, OpenVR.k_pch_Camera_EnableCameraForRoomView_Bool, true, ref error);
and i checked OpenVR.Settings.GetBool()
it changes the value but in the steamvr application ie compositor it doesnt change and also GetBool works correctly and in realtime with doing changes within steamvr application(compositor).

SteamVR_LevelLoad loadingScreenTransform being overridden

I think I've found an issue in the code where a transform override to the loading screen is being set.

	if (loadingScreen != null && loadingScreenDistance > 0.0f)
	{
		// Wait until we have tracking.
		var hmd = SteamVR_Controller.Input((int)OpenVR.k_unTrackedDeviceIndex_Hmd);
		while (!hmd.hasTracking)
			yield return null;

		var tloading = hmd.transform;
		tloading.rot = Quaternion.Euler(0.0f, tloading.rot.eulerAngles.y, 0.0f);
		tloading.pos += tloading.rot * new Vector3(0.0f, 0.0f, loadingScreenDistance);

		var t = loadingScreenTransform != null ? loadingScreenTransform : transform;
		t.position = tloading.pos;
		t.rotation = tloading.rot;
	}

The above code seems to be setting the loadingScreenTransform to t then on the following line overwriting it with the generated tloading.pos and tloading.rot.

I tested the following fix in my code and the results for both having a transform override or not seem to function as expected.

	if (loadingScreen != null && loadingScreenDistance > 0.0f)
	{
		// Wait until we have tracking.
		var hmd = SteamVR_Controller.Input((int)OpenVR.k_unTrackedDeviceIndex_Hmd);
		while (!hmd.hasTracking)
			yield return null;

		var tloading = hmd.transform;
		tloading.rot = Quaternion.Euler(0.0f, tloading.rot.eulerAngles.y, 0.0f);
		tloading.pos += tloading.rot * new Vector3(0.0f, 0.0f, loadingScreenDistance);

        	var t = transform;

            	if (loadingScreenTransform != null)
    	    	{
            		t = loadingScreenTransform;
            	}
    	    	else
        	{
            		t.position = tloading.pos;
                	t.rotation = tloading.rot;
    	    	}
    	}

MacOS support?

Hi there -

Will this be updated soon to include MacOS support? (or is there a way to get it to work?)

Thanks!

RenderModel needs to be seperated from interaction model

Currently the SteamVR_RenderModel loads the 3d models for SteamVR and handles the animation of the meshes. However the script is both rather hacky and breaks quite often in a more complex project (Refresh() in controller manager doesn't always carry on being called until everything is in place).

I appreciate the sentiment of wanting to allow users to customize their controller but most of the time we want to put our own controllers in the app, and this would be made much easier if there were some prefabs that replicate the various typical controllers (oculus and vive) with a simpler option to replace the meshes and materials, and allow the user to load their own only when we and they choose to do so.

The better way in this case is to let unity prefabs do loading with the pivots already set up and then allow steam vr to load custom controllers only when we want to allow it.

Tracking Issues only in Unity 5.6

The motion controllers/the whole view are jumping up and down. Tested using Oculus Rift + Touch using SteamVR in Unity 5.6 on Windows.

It has to do with the SteamVR plugin, because if you enable the VR Steam overlay of SteamVR, you can see that the tracking is fine, but in the background you can see the Unity application still bugging.

CircularDrive appears to operate in world space

When operating a circular drive, it works fine when I am facing perpendicular (in world space) to the axis of rotation set on the gameObject, rotates backwards when I turn 180 degrees, and more or less twitches without doing anything when I'm facing along the axis of rotation. It appears that the axis of rotation is not being converted properly to the object's local space.

SteamVR_UpdatePoses deprecation removes the controllers

There is no way to see the controllers with the current version of the SteamVR plugin. Even adding the Update Poses script to the Camera component in the [CameraRig] doesn't do anything because the script is automatically removed now with this message:

SteamVR_UpdatePoses has been deprecated - REMOVING
UnityEngine.Debug:Log(Object)
SteamVR_UpdatePoses:Awake() (at Assets/SteamVR/Scripts/SteamVR_UpdatePoses.cs:14)
UnityEditor.HostView:OnGUI()

Scripts like LinearDrive are not Polymorphable

I would like to create a custom LinearDrive, that moves the repositioned GameObject on a free axes, but when released clicks in Place at discrete Points.

That means I only have to create some new variables and change a function from LinearDrive. To archive this while maintaining an upgradable SteamVR Plugin, I want to Inherit the new Script from LinearDrive and use Polymorphism to adjust the functions I need.

Sadly, I cannot access the private variables in LinearDrive, because they have no Set/Get Function.

Would it make sense, if I made a pull request with these added Set/Get functions?

The plugin can't be built for the Windows Universal target

Hi,

The plugin can't be built for the Windows Universal target. I know that this plugin will not work on that target, but a game can be built for SteamVR on Linux, for Oculus home and for Windows Mixed Reality. The Windows Universal API doesn't support some methods. We can fix that by two methods

  • Using defines #if !UNITY_METRO to block the code that doesn't compile
  • Refactor the code to be compatible

If you want SteamVR on Windows Universal, it's a good idea to start a refactor, however the first point is better and faster if don't. I can submit a pull request with these changes. However there are some changes to do in Steamvr_api.cs and I don't have the hands on it.

This is all errors returned by Unity when trying to build for Windows Store

image

I fixed all of these with simple #if !UNITY_METRO

TeleportAreaVisible - Shader is pink

I am using Unity 2017.2.0f3 Personal. and the Shader of the teleport Area is pink for the Higlight and the SeeThru .. which makes it very irritation to work on the scenes.

bildschirmfoto 2017-11-28 um 00 08 06

any idea how to get rid of it ? or is it because of the new Unity version. Just started to work on SteamVR

Unity Video Component

I am using the steamVR plugin for a vr app witch plays a video. Therefore I am using the unity Video player (video component). In the Unity editor everything runs fine. But when I am making an executeable (build) the video does not start ...you only see the first frame of the video.
My system is Windows 7 - and I am using Unity 5.6.2f1 (64bit)

Unity Steam VR Oculus Touch disabling on Start with latest unity version 2017.2

I have really no clue anymore, i checked everything, searched the internet for solutions and have no idea what the problem is. As the title says already my both controllers get disabled when i press play in unity, i deleted the main camera put the camera rig from the assets inside and they just get disabled when i press play. Anyone knows this issue and has maybe a solution to it?

SteamVR Oculus HDR Mode issue

Hello,

I have a game developed with Unity and steamVR working for HTC vive. I would like to add a compatibility with Oculus Rift, as as far as I understood steamVR should be compatible with it.

Trying it I have found a couple of issues that I' appreciate if you could help me to solve or maybe they are a limitations of the plugin.

The first thing I tried is to simply connect the oculus and try the same build I had working for vive, and it was working, but I had a poor image quality as the default HDR Mode is not R11G11B10, so finding how to solve the problem I found that I had to do the following:

  • Add the oculus sdk on the "player settings" and before the OpenVR sdk.
  • Then I had to download and install the "oculus integration" plugin form the asset store, and add an script to my steamVR [CameraRig] object with the following line to enable the R11G11B10 mode. "OVRManager.eyeTextureFormat = OVRManager.EyeTextureFormat.R11G11B10_FP;"

Well with this I solved the problem with the image quality, but now since the oculus SDK is in the first position my controllers are not working and the camera appears to be upside down.

So my questions are, is there anyway to solve this problem? or to activate the R11G11B10 mode without having to add the oculus SDK on the player settings? If it is possible to solve, will this be able to be published on oculus store or it has to have the oculus SDK?

If it isn't possible, then the way to proceed is to have a different camera setup for each headset as well as different builds?

Thank you very much.
Cheers.

OpenVR.System null reference using SteamVR 1.2.2 and Unity 5.6.0.3.p

When I try to run a VR application in the Unity editor with the latest version of steamVR (1.2.2) I always get the following null reference: NullReferenceException: Object reference not set to an instance of an object
SteamVR.GetStringProperty (ETrackedDeviceProperty prop, UInt32 deviceId) (at Assets/SteamVR/Scripts/SteamVR.cs:167). The problem here is this line: hmd = OpenVR.System; OpenVR;System returns null for some reason. This happens in an empty scene in a new project, in the sample scenes and also in a scene from an existing project. The headset is tracking correctly and the application runs in editor, but the controllers are not showing up in the scene.

Cannot build working example scene [Linux/Ubuntu]

After making the change mentioned in issue #19, I was able to finally load the example scene.

However, even after setting up the Vulken Graphics API in the Player Settings, I still cannot seem to get the compiled version to load up in SteamVR.

SteamVR is running on this machine, I can put the headset on and see the default grid world.

I'm using the NVidia Beta Vulken drivers version 375.27.14 because the version from the PPA mentioned here:

https://github.com/ValveSoftware/SteamVR-for-Linux/blob/master/README.md

Didn't seem to support direct mode for some weird reason.

Is there a trick to getting this thing to actually start up in the headset?
Is there a bug with the plugin that I've missed?

Thanks

SteamVR_PlayArea calculates vertices at different corners depending on Calibrated or specific size

If the SteamVR_PlayAre is set to Size = Calibrated then the vertices in the public vertices variable are reported as follows:

vertices[0] = Bottom Right Inner point
vertices[1] = Bottom Left Inner point
vertices[2] = Top Left Inner point
vertices[3] = Top Right Inner point

vertices[4] = Bottom Right Outer point
vertices[5] = Bottom Left Outer point
vertices[6] = Top Left Outer point
vertices[7] = Top Right Outer point

If the Size is set to any other specific size (e.g. 200x150) then the vertices Vector3 array reports the corners in different locations:

vertices[0] = Top Right Inner point
vertices[1] = Bottom Right Inner point
vertices[2] = Bottom Left Inner point
vertices[3] = Top Left Inner point

vertices[4] = Top Right Outer point
vertices[5] = Bottom Right Outer point
vertices[6] = Bottom Left Outer point
vertices[7] = Top Left Outer point

This causes issues if these vertices are being used to draw a Play area representation as the figures are not consistent.

The piece of code that dictates the manual Quad for the play area is located here:
https://github.com/ValveSoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/Scripts/SteamVR_PlayArea.cs#L66-L80

However, to have it consistent with how the Calibrated play area is set up it should be:

pRect.vCorners0.v0 =  x;
pRect.vCorners0.v1 =  0;
pRect.vCorners0.v2 =  -z;

pRect.vCorners1.v0 =  -x;
pRect.vCorners1.v1 =  0;
pRect.vCorners1.v2 = -z;

pRect.vCorners2.v0 = -x;
pRect.vCorners2.v1 =  0;
pRect.vCorners2.v2 = z;

pRect.vCorners3.v0 = x;
pRect.vCorners3.v1 =  0;
pRect.vCorners3.v2 =  z;

Example of the discrepancy in an image:
image

I'll also raise a PR to go with this ticket.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.