extendrealityltd / vrtk Goto Github PK
View Code? Open in Web Editor NEWAn example of how to use the Tilia packages to create great content with VRTK v4.
Home Page: https://www.vrtk.io/
License: MIT License
An example of how to use the Tilia packages to create great content with VRTK v4.
Home Page: https://www.vrtk.io/
License: MIT License
It's not possible to change the colour of the controller meshes as the dark textures of the HTC controllers don't lend themselves well to tints.
However, it may be possible to use a different shader and provide an outline colour on the controller models (like as seen in The Lab)
Need to look at how other games are doing this.
Some use a cube attached to the controller and a pointer.
Others just bring up a big screen and fade the background with options to select
Ever since the recent addition of the analog trigger function, my previously working script on a usable object now seems to need at least a double press to "use". Could be the analog messing with it, but could also be my script. I'm not sure.
Might need to differentiate partial press and a full press? This is assuming they are actually separate, like a Steam Controller.
At the moment there is only 1 interaction button (e.g. trigger). pressing it does both grab and use.
You cannot grab an object and then use it because if you're grabbing an object you're pressing the interaction button, so releasing it drops the object.
It would be nice to have a grabbed object then press a different button to use the held object.
This also lends itself well to the grab on click, drop on click rather than the hold grab button.
Should be easy enough to implement by having a new button alias (one for grab and one for use)
It would be nice to demonstrate how to have a prefab that can be picked up and fired.
At the moment all of the files are in a "Resources" folder which makes it more difficult to copy over to existing projects. If all the files sat in a distinct directory (within Resources) then it would be easier to separate it and move them over to other projects.
If it doesn't exist, a simple way to affix an fps counter within view to make sure a project stays under the desired fps. Or if anyone knows of an existing way that's easy to use, I'm interested in knowing about it.
At the moment the teleporter never changes the y position of the CameraRig so it's not possible to ascend or descend.
It would be possible to determine where the pointer was touching on an object and if it is above the object then you can change the y of the CameraRig to the y of the colliding object (compensating for the height of the rig)
Thanks very much for these great tutorials and scripts. I've gone through them and this is a great 1st start into using Unity with Steam VR (for a beginner). I noticed that your terrain teleport script had the same teleport style as shown in Valve's "the Lab" (someone on Youtube had asked for this). I've got teleporting working fine with the Unity Terrain and simple teleporting for other scenarios, but do you know how to maintain relative height off of an imported mesh? I noticed that the terrain sample scene you provided had a terrain collider on the terrain object. But how can this be achieved with any imported mesh? Mesh collider doesn't seem to work for that. But what I'd like to do is import a real-world terrain and have the teleporting work as expected on these imported terrains (which are actually meshes). This would allow me to import elaborate terrain meshes, and then walk and teleport around on them....
I assume it's running too early and the models haven't been built yet, but SteamVR_InteractGrab's Start() method tries to get the "tip" GameObject before it exists, which in turn prevents the grabbing events from binding to AliasGrabOn/Off.
EDIT: Just realised it's because I'm not using the bundled prefab. Oops. Might be worth having it add the RigidBody on the fly as not every controller will use this structure.
This could be done in two ways.
1: The interactable object could have a flag that turns the controller mesh renderer off when it collides with it. This means that you can determine which objects want to turn the controller off and which don't but it means its harder to maintain the workings of the objects as they all need the parameter setting.
This could easily be my fault, as I merely added the Bezier Pointer Script to the Controller, and the Height Adjust Teleport script to the CameraRig, but I cannot seem to find a difference between my scene and the sample scenes you've provided.
As spoiled in the Subject, when I move either controller directly underneath the HMD, I teleport up on Y as if standing on my controller beneath me. Move the controller away and I of course teleport back down to the ground.
If this was covered in your amazing tutorials I apologize for missing it!
Cheers
-Steven
You could make it so that when you check things like "is Grabbable" it enables you to pick a textbox with a script that it runs when grabbed, the same could be applied to onuse etc
Not hugely fluent in unity so forgive me if this is a silly idea / notion
At the moment a terrain or mesh collider won't work wth the Height Adjust teleporter. Need these to be supported too.
This video for reference:
https://www.youtube.com/watch?v=nMYWpGFzcvI&feature=youtu.be&t=76
Hello! if i rotate the camerarig then teleport on the controllers / bezier pointer go all of the place. for instance if i rotate it 180 the bezier comes from the bottom of the controller.
Some object that can be moved around (maybe a car) and use the trigger axis for something (maybe like jump power or something)
Need some way of dealing with collisions on teleport to prevent the play area allowing a user to walk into a game object
Project a play area sized cursor on the floor where the pointer is pointing to to show where the play area will be after teleport.
The cursor will also have a trigger collider on it so if it collides with any other objects it can set a flag to say a collision has happened and if a collision is happening then don't throw the set new teleport location.
This value can also be used by extended pointers to change the colour of their beam depending on whether the location is valid or invalid.
Can get the size of the play area from the SteamVR_PlayArea script as it contains a public Vector3[] verticies variable which contains the relevant points for drawing the play area boundaries, so can use this numbers to create the cursor at the right size.
It seems this is something the SteamVR plugin supports, I need to investigate how to bring this functionality over (in a working form) to the toolkit
For some reason after updating the toolkit, SteamVR and Unity (to 5.4 b17) whenever I try to pick up an object it dangles below the controller like it's trying to fall, and keeps falling a bit then resetting to the attach point, rinse and repeat.
This doesn't seem to happen on the example so I'm not entirely sure what I'm missing. It's just a basic cube Rigid Body with a mass of 1, 0 drag, box collider for collision, etc. Set to Simple_Snap.
Any thoughts on what may be up here?
The trigger is an analog button so will have a value of 0f to 1f depending on how hard it is pressed.
Update the button event to throw the button pressure which will include this number.
On the trigger it will make sense as it will be from 0f to 1f (0f when released, 1f when fully pressed)
On all other buttons because they are digital will only report 1f when pressed.
Ability to move the play area using the touchpad and always walk forward in the direction the headset is facing.
https://github.com/TomorrowTodayLabs/NewtonVR
Someone shared this with me on Reddit, thought I'd pass it along for others to check out. I'm not sure if there's anything in there that might inspire some new features to incorporate into the Toolkit.
A little inventory function like in Budget Cuts would be very nice.
Don't know if it's just me getting these problems though.
Example scene 016_Controller_HapticRumble doesn't seem to be working in Unity, no rumble detected
Implement the ability to grab an object with two hands to scale and rotate that object.
Hi,
Just wanted to give you a heads up. Wanted to try something in Unity with my Vive and your scripts are pretty much something you come across immediately when wanting to do something useful with it. So thanks for that. :)
After importing the Unity toolkit into my project using the video you made and creating the Camera_Rig you provide in the toolkit interactive performance of Unity itself tanks.
I found out that I turn off the play_area script the editor works like it should. In the bottom right I get the following error:
Failed to get Calibrated Play Area bounds! Make sure you have tracking first, and that your space is calibrated.
UnityEngine.Debug:LogWarning(Object)
SteamVR_PlayArea:GetBounds(Size, HmdQuad_t&) (at Assets/SteamVR/Scripts/SteamVR_PlayArea.cs:48)
SteamVR_PlayArea:BuildMesh() (at Assets/SteamVR/Scripts/SteamVR_PlayArea.cs:93)
SteamVR_PlayArea:Update() (at Assets/SteamVR/Scripts/SteamVR_PlayArea.cs:213)
My game area is calibrated, am I missing something obvious.
the Interact_Grab has a basic mechanic for grabbing hinged items but it has some flaws due to using a Spring Joint to attach the controller to the grabbed object.
A better solution would be to have objects like doors, etc to have a Use concept that then tracks the position of the "using" controller instead of using joints as this will provide a tighter control of the object.
021_Controller_GrabbingObjectsWithJoints
This could and probably does pertain to any other given scene supporting object grabbing. When you hold an object in one hand, then (while still maintaining the hold) you grab the same object with the other hand, then subsequently let go of the previous hand, depending on how far apart you moved either hand while both were grabbing the object, the object will 'swing' off of the remaining grabbing hand as if on an invisible string (phew that was some sentence!).
Think of the magic trick where a card is suspended between the magicians hands by very thin, invisible wire.
Cheers
-Steven
Ability to provide a curve of time when to initiate the vibrations to achieve specific sequences such as "1 buzz - pause - 2 buzzes - stop"
Using the modified Steam VR / Unity Toolkit [CameraRig] causes in-editor slowdown and lagginess in even the most basic scenes as compared to standard Steam VR (from asset store).
ps: work so far is great :)
Is it a possibility to eventually exclude things from the height teleporter?
For instance, in a multi storey house, you'd want to be able to scale stairs and move up/down levels, but not be able to climb on prop like a table, or something like a statue.
Another problem is that a table(assume one with legs) could have physics objects on top of and underneath it. This would mean you could teleport into it, as well as on top of it; depending on what type of teleporter you're using.
Sync headset, controllers and player action over network.
Is there something else you have to do besides dragging the pointer to the controller and the base teleporter to the camera rig in order for blink to work? I've tried adding SteamVR_Fade to the camera rig and tried change the amount of time for fading but neither worked.
021_Controller_GrabbingObjectsWithJoints
It appears (to me at least on my end) that the door's physics response to being grabbed and opened/closed is multiplied the further you move the controller from the initial grab point. The small container though (with the marbles) behaves as expected.
Fantastic job btw, bravo! ๐
Cheers
-Steven
Sometimes you want to interact with an item and simply use it (i.e. call a local action to happen on that object)
Whilst it seemed like a good idea at the time to call the scripts within this toolkit the same prefix as the SteamVR plugin scripts, it's actually really dumb.
If there is ever a script in the plugin with the same name then there could be confusion or even compile errors.
Need to change the script names in this toolkit to something more distinct to reduce confusion and prevent issues in the future.
Suggested prefix: SVRUT_
Currently, grabbing an object will pick it up at the angle you grab it at. However, it would be good to have an interactable object with a fixed rotation property so when the object is picked up then it will be facing in a specific way on the controller.
For instance, picking up a gun or a sword it wants to face in the same way
I'd like to develop for both VR & non-VR systems at the same time. When I add the SteamVR Unity Toolkit to my project, I need to add multiple scripts to each object, across many objects specific to VR. However, if no VR equipment is attached, I get flooded with errors about controllers not found etc.
Is there a relatively easy way to disable the VR-specific scripts if SteamVR doesn't see any VR hardware? Maybe in Start(), it could check SteamVR.active boolean & disable itself across all the VR scripts?
I get the following errors when I try to use the 003_Controller_SimplePointer
example:
Assets/SteamVR_Unity_Toolkit/Scripts/SteamVR_ControllerInteract.cs(118,50): error CS1061: Type `SteamVR_ControllerEvents' does not contain a definition for `AliasInteractOn' and no extension method `AliasInteractOn' of type `SteamVR_ControllerEvents' could be found (are you missing a using directive or an assembly reference?)
Assets/SteamVR_Unity_Toolkit/Scripts/SteamVR_ControllerInteract.cs(119,50): error CS1061: Type `SteamVR_ControllerEvents' does not contain a definition for `AliasInteractOff' and no extension method `AliasInteractOff' of type `SteamVR_ControllerEvents' could be found (are you missing a using directive or an assembly reference?)
Similar to the pointer in The Lab. It would project forward a given length and then project down to the nearest floor, it would also be possible then to have the cursor check to see if teleporting to that location would cause clipping in the walls and could prevent teleporting to that location.
Would be nice to have a nice curved line with a cool looking floor cursor with particles
At the moment you can only hold a button down to keep hold of an item, letting go of the button always drops the item.
Would you want to be able to grab and hold some items but other items to click to hold and click to drop?
Firstly i am just learning unity, so your library is a great help and i have used it to create some fun things and learn how to use vr and how to use unity.
Could you possibly add a script that enables the pointer to interact with objects, for example enable the pointer to point at an object and trigger something then this could be used to interact with menus etc (like in Whirligig the menu system is really good).
For example
You point to a box and pull the "trigger" this then makes the box run a script/react etc.
In my SteamVR game, I want players to be able to point a controller at a world-positioned UI canvas & use the trigger to click a button -- just like the player interacts with the official SteamVR interface. Is this possible with the current toolkit? If so, how is it done? If not, can this feature be added?
I cannot seem to teleport with my left controller anymore. I tried to look into it but I am not that experienced haha. Any help would be amazing. Thanks!!
Make the controller rumble when a user touches, grabs or uses something.
Perhaps you could have a global rumble amount that is overriden by the touching object?
It would be nice if the controller events contained specific events for common actions and then the events script could be configured to set which controller buttons did these actions (similar to how Unity has a jump, start, cancel alias)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.