Git Product home page Git Product logo

vive-teleporter's Introduction

HTC Vive Teleportation System with Arc Pointer

This is an easy-to-use teleportation system for the HTC Vive and the Unity game engine. The system is modelled after Valve's game for the Vive The Lab, where the player can traverse VR environments that are bigger than the play area. Below you can see myself demoing the system (click for higher quality):

Demo

The system presented here solves a number of problems:

  1. Calculating Navigable Space: You obviously don't want the player to be able to teleport out of bounds, or inside opaque objects. To solve this problem, my system uses Unity's generated Navigation Mesh as the boundaries that the player can teleport to. Because this process is piggybacking Unity's work, it is stable and can be used reliably in most projects. In order to preload this data, simply add a "Vive Nav Mesh" component anywhere in your scene, and click the "Update Navmesh Data" button in the inspector. You can of course update the Vive Nav Mesh component with new NavMesh bakes whenever you update the scene. The above process is illustrated below:

    Updating the NavMesh

  2. Selecting a Teleport Destination: This system uses an intuitive parabolic curve selection mechanism using simple kinematic equations. Once again, this was inspired by Valve's The Lab. As the user raises their controller to a higher angle, the selection point grows farther away. If the user raises the remote past 45 degrees (maximum distance of a parabolic curve) the angle stays locked at that distance.

  3. Representing the Play Area: It is often useful to know where the chaperone boundaries will be after teleporting. For this reason the system draws a box around where the chaperone bounds will be.

  4. Reducing Discomfort: The screen fades in and fades out upon teleportation (the display "blinks"), reducing fatigue and nausea for the user.

Provided in this Unity project (version 5.5.0p3) are two sample scenes: one is integrated directly with SteamVR and one may be used to demo the system if you don't own or have access to an HTC Vive. The source code is well documented and commented and may be used following the MIT Licence (see LICENSE.txt).

Getting Started

To get a basic teleportation setup running you need to use three components:

  • The Vive Nav Mesh component handles the conversion between Unity's NavMesh system to a renderable mesh. It also calculates the borders of the NavMesh so that they can be shown to the player when choosing a place to teleport.
  • The Parabolic Pointer component generates/displays a pointer mesh and samples points from a Vive Nav Mesh.
  • The Vive Teleporter component handles the actual teleportation mechanic. It pulls pointer data from a Parabolic Pointer so that it knows where to teleport. It also smoothly fades the screen in and out to prevent discomfort when the player decides to teleport. It also interfaces with SteamVR to handle button press events, controller management, haptic feedback, and displaying the room boundaries when choosing a place to teleport.

Quick Note: The Teleport Vive and Parabolic Pointer components both automatically add a Border Renderer component. Border Renderer simply generates and renders a mesh to display the borders of the Vive Nav Mesh and the SteamVR play area.

Step 1: Configure the Vive Nav Mesh

Vive Nav Mesh

Start by adding a Vive Nav Mesh object. You can find a preconfigured Vive Nav Mesh at the path: Vive-Teleporter/Prefabs/Navmesh.prefab in your Assets folder. You can put this object anywhere in your scene's heirarchy and at any position in the scene.

Next you need to bake a Navigation mesh ("Navmesh") in Unity. This can be done in the Navigation window (Window > Navigation).

Here are a few more considerations to keep in mind:

  • You must use physics colliders on all teleportable surfaces. The parabolic pointer (see step 2 below) uses physics raycasts to determine where the player is pointing. Because of this all teleportable surfaces must have a collider (as well as surfaces like walls that aren't teleportable but block the pointer anyway).
  • It might also be a good idea to assign different Navigation Areas to areas that are not teleportable. This is helpful for optimization reasons (so that the system doesn't need to render an enormous preview mesh when the player chooses where to teleport) and for game balance reasons (so that the player can't teleport outside of the map).

After you have baked the Navmesh (using the "Bake" button at the bottom of the Navigation window) go back to the Vive Nav Mesh object you created earlier. If you have decided to assign specialized Navigation Areas (see above) you can choose which areas are teleportable with the Area Mask property. Then, click on the "Update Navmesh Data" button in the inspector and you should see your Navigation mesh display in the Scene View.

Properties

  • Area Mask: Defines the Navmesh area mask used by the system. One application of this is for optimization - by setting some objects as "non-teleportable," you can reduce the polycount of the preview mesh.

Render Settings

  • Ground Material Source: The material to be used for previewing teleportable areas.
  • Ground Alpha: This is an animatable parameter that changes the alpha (transparency) of the ground material. The Vive Teleporter script (see below) uses this value to animate the preview when the player is selecting a place to teleport.

Raycast Settings

  • Layer Mask: Used to mask colliders that are recognized by the system. Note: layers included in this mask are not recognized at all by Navmesh queries (by the Parabolic pointer for example). So, the arc pointer will go through colliders captured by the layer mask. This is useful for surfaces that you want to be recognized by other systems, such as AI, but not the teleporter.
  • Ignore Layer Mask: If true, layers included in the Layer Mask are considered "valid". If false, layers included in the Layer Mask are considered invalid and all others are valid.
  • Query Trigger Interaction: Determines if trigger colliders are recognized by the system. "Use Global" uses the Physics.queriesHitTriggers setting.

Navmesh Settings

  • Sample Radius: This should be set to the Navmesh Voxel Size that you are currently using. You can find this in the Navigation Window (Navigation > Bake > Advanced > Voxel Size). If this value is too small, you may experience issues where teleportable surfaces are not recognized correctly.
  • Ignore Sloped Surfaces: If true, the system will ignore sloped surfaces when querying the Navmesh. This is highly recommended, as players can't actually walk up sloped surfaces in VR!
  • Dewarping Method: In some cases (especially in larger scenes with lots of detailed geometry), Unity's Navmesh will not give an aesthetically pleasing output. For example, in some cases flat surfaces will appear as non-flat in the Navmesh output. You can use a so-called Dewarping method to filter Unity's navmesh in the Navmesh preview.
    • None: Use no dewarping. This is usually OK for smaller scenes.
    • Round to Voxel Size: Rounds the Y-position of each vertex in the preview mesh to the Sample Radius defined above. This has no additional overhead when Processing the Navmesh, but the preview mesh may appear to be floating above the ground.
    • Raycast Downward: This is the most accurate dewarping method, but comes with additional overhead when processing Navmesh data (that is, when Clicking the "Update Navmesh Data" button). For each vertex in the preview mesh, the system shoots a raycast downward to find the exact position of each vertex. This ensures the accuracy of the mesh.

Step 2: Configure the Parabolic Pointer

Parabolic Pointer

Next add a Parabolic Pointer object. You can find a preconfigured Pointer at the path: Vive-Teleporter/Prefabs/Pointer.prefab in your Assets folder. You can put this object anywhere in your scene's heirarchy and at any position in the scene.

Properties

  • Nav Mesh: [Required] The Vive Navmesh you are using (see above).
  • Parabola Trajectory: Use these options to configure the shape of the pointer's arc. Increasing the Z parameter of the Initial Velocity OR increasing the Y parameter of the Acceleration will make the pointer arc travel further.

Parabola Mesh Properties

  • Point Count: The maximum number of points in the parabola arc mesh. Increasing this allows the arc to cover larger distances, but has a performance / rendering cost.
  • Point Spacing: The distance (in meters) between each point in the parabola arc mesh. Decreasing this brings the arc mesh closer to a perfect parabola, but the arc covers smaller distances with the same Point Count (see above).
  • Graphic Thickness: The thickness (in meters) of the arc mesh.
  • Graphic Material: The material used to render the parabola mesh. The UVs of the arc mesh are automatically configured so that the given texture is scrolled smoothly along the arc (U = 0 on left side of arc, 1 on right side. V is repeated and scrolled along the length of the parabola).

Selection Pad Properties

  • Selection Pad Prefab: Prefab to use as the "selection pad." This is placed at a tentative teleport destination when the player is pointing at a valid teleportable surface. By default, I have included an orange selection pad mesh (Vive-Teleporter/Art/Prefabs/Selection Pad).
  • Invalid Pad Prefab: Prefab to use as the "selection pad" when pointing at an invalid / non-teleportable surface. By default, I have included a red X mesh (Vive-Teleporter/Art/Prefabs/Invalid Selection Pad)

Step 3: Configure the Vive Teleporter

Vive Teleporter

Lastly you need to add a Vive Teleporter Component (Component > Vive Teleporter > Vive Teleporter) to the SteamVR Camera. This is the camera that is used to render to the Vive's display. If you are using the [CameraRig] prefab from the SteamVR Unity plugin you should add the Vive Teleporter to the Camera (eye) object in that prefab.

Properties

  • Pointer: [Required] Set this to the Parabolic Pointer object you created in Step 2
  • Origin Transform: Set this to the origin of the tracking space. If you are using the SteamVR Unity Plugin, this is the [CameraRig] GameObject. This is the object that is actually moved when the player teleports.
  • Head Transform: Set this to the transform of the player's head. This should be a child of the Origin Transform. If you are using the SteamVR Unity Plugin, this is the Camera (head) GameObject.
  • Navmesh Animator: Set this to the Animator of the Vive Nav Mesh object created in Step 1.
  • Fade Material: Set this to the material found in Vive-Teleporter/Art/Materials/FadeBlack.mat
  • Controllers: Populate this with the SteamVR controller objects. If you are using the SteamVR [CameraRig] prefab, you should populate this with the Controller (left) and Controller (right) objects.

vive-teleporter's People

Contributors

derekhendrickx avatar flafla2 avatar meoiswa avatar rorydungan 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

vive-teleporter's Issues

Ignore Triggers when doing the Raycast

When there are big Trigger area in the scene (see the screenshot below), you can't teleport inside them. When doing the Raycast, the Triggers aren't ignored.

capture

`AI' does not exist in the namespace `UnityEngine'

Hi Flafla2,
Thanks for sharing your solutions for the teleporter.
Unfortunately I'm having some issues with the scripts and I'm not a great coder.
When I try to drag the scripts TeleportVive and BorderRenderer into Camera(eye) the two warning messages I get are:

Assets/Vive-Teleporter/Scripts/ViveNavMesh.cs(2,19): error CS0234: The type or namespace name AI' does not exist in the namespace UnityEngine'. Are you missing an assembly reference?

Assets/Vive-Teleporter/Scripts/ViveNavMeshEditor.cs(4,19): error CS0234: The type or namespace name AI' does not exist in the namespace UnityEngine'. Are you missing an assembly reference?

Any idea what I can do about it?
Thanks for your help.

Latest SteamVRplugin incompatible

When I attempt to play get the following compile error

VR: OpenVR Error! OpenVR failed initialization with error code VRInitError_Init_InstallationNotFound: "Installation Not Found (100)"!

testing without a vive

Hi,
is it possible to test this without owning a vive? In the unity play window itself?
Also: does this work with the player prefab instead of the camera rig prefab?

Indicator Circle not Present

Hey There,

I have this set up as correctly as I can imagine. I'm sure it's still user error. I get the Parabolic line work, but no "target" circle or orange border on the floor. Also upon pressing, it doesn't teleport, should it?.

How to get started integrating this into my project.

Hi,
Im having difficulty getting this to copy to my project. When i drag in the unzipped files, unity crashes.
How do i add it to my project? I didnt see a asset package, and tried to add it to a blank project since i saw steamvr is included and couldnt get that to work either.

Thanks,
Alex

Confusing documentation

Unless I am missing something I think the documentation could be clarified in Step 1
Next you need to bake a Navigation mesh ("Navmesh") in Unity. This can be done in the Navigation window (Window > Navigation).

Not mentioned is that you need to select a piece of static geometry that represents your ground and THEN go to Navigation, Bake.
At least that is what works for me

Separating the components.

How would I go about separating the NavMesh component from your Pointer and Teleport components, if I wanted to use a different implementation of a pointer/teleport system?

In my instance, it would be using VRTK's Bezier Pointer and Height Adjust Teleport with your NavMesh high-lighting?

ground selectable border

Hi;I have a problem,when I press touchpad,the ground and selectable border doesn't show in my scene,could you give me a solution?

Tutorial Video for how to cheat and seemingly get the Vive-Teleporter to work on irregular surfaces

YouTube tutorial video:
https://youtu.be/BMcOXQsUHlM

How to get the Vive-Teleporter Unity asset to work, and how to cheat and seemingly get it to work on irregular surfaces.

This tutorial was made using the version of Vive-Teleporter from 6/20/2016. As Flafla2 continues to work on his Vive-Teleporter project the content in this video may become incorrect or obsolete.

Unity version 5.4.b21
SteamVR plugin for Unity - v1.1.0

Recorded using XBox Game DVR

Changing the NavmeshData during Runtime

Hey,

I need a solution to change the NavmeshFiles during runtime. For example if I do something "special" a new area will be activated.
I just need to change the Area Mask and clear / update the Navmesh. Hope you understand my issue and help me out here (: .

Thanks
MotionBrain

Associated script can not be loaded.

Hey, amazing work!

I opened your test scene, and all of the scripts can't be loaded in the Nav Mesh?
Any fixes? I'm probably just being super dumb ๐Ÿ‘

Thanks in advance!

Vive Teleporter needs a way to tell the surrounding App that teleporting is in use

There may be an understood standard for these types of things (which I do not know) but I find myself needing to modify the vive-teleport script so that I can tell the rest of my app to stop what it is doing in regards to controllers (i.e. disable the laser pointer I have attached to the controller). Is there a better way than modifying the vive-script which I would like to update as it moves forward to let the rest of the app know that the teleporter is use?

Great work, would you be willing to implement a version into my toolkit?

Hey, love your teleporter style. I have a steamvr toolkit on github that offers a number of out the box scripts. One is a teleporter like yours, but I'd love to have a version with the style you have.

I could obv just look at your code and reimplement it, but that feels a little cheeky as it's your hard work.

SteamVR 2.0.1 Update

The teleporter need updated to the new framework.
I try to see if I can update it and send you the code

"Update Navmesh Data" button not visible until after code modification

I wasn't able to see the "Update Navmesh Data" button or anything after it in the Navmesh object. I kept getting a null reference error (or some similar reference error). The error was from this line:
bool HasMesh = mesh.SelectableMesh.vertexCount != 0 || mesh.SelectableMeshBorder.Length != 0;

The error was being reported on the SelectableMesh object.

I moved this line right after the following GUI Button If statement and everything worked from then on.

I've since moved the line back to its original position and it continues to work.

Parabola doesn't ignore triggers

Trigger colliders are not ignored by the parabola pointer when trying to pass into them.

This is noted in #49 as well

problematic

EDIT: i have added a layer called lighting and set the raycast settings on the ViveNavMesh object to ignore it. I see this as a temporary fix as the triggers should be avoided by default (kinda the point of a trigger; to be entered)
image

Crash on adding NavMesh

Hi,
I'm trying to setup your prefab, when i add the NavMesh into the heirarchy Unity crashes, every single time, no matter where i put it.
Could it be because i'm on the 5.4 beta?
Thanks

Multi camera issue

I have two cameras in scene, one for scene rendering, other for UI overlay.
When teleporting, there are two grid showing.
Change Graphics.DrawMesh parameters to draw only on main camera doesn't seem to work, and layermask neither.

Any ideas?

Teleportation by proxy

Thank you for this. I love your teleporter and the navmesh. In my project, I'm navigating an architectural model, and I use a scaled version of that model for navigation. Each model is disabled while the other is active. I'm wondering if you think it would be possible to extend the teleporter so that while viewing the scaled model, I'd be able to use the teleporter on the scaled model's navmesh it and have it teleport me to the referenced location on the full scale model's navmesh? I'm going to try but I have never worked with navmeshes before and I don't know their limitations.

Controls

how do i change it so you press the menu button to teleport?

Optimize Navmesh Polling

The API currently slows to a crawl when dealing with large Navmeshes. The most intensive step currently (at runtime) is raycasting against the Navmesh, an O(T) calculation (T=number of triangles). This performance is dismal in comparison to Unity's own navmesh, which does some sort of preprocessing beforehand. Clearly this can be improved, however I want to retain the non-invasive aspects of the current system (ie the user can currently use the Unity navmesh for AI or other things and doesn't have to limit the bake settings just because of Vive teleportation).

The easiest solution is to roll with an existing pathfinding system. Detour (a part of the Recast navigation system) seems like an excellent candidate in this regard. It shouldn't be too difficult to port Detour to C# (using C#'s native DLL binding system).

Teleport Location Should Change Colour When Valid / Invalid

Right now, the location you're about to teleport to is always lit up as orangeโ€”even if you can't teleport there.

It would be very handy to have this marker turn green when the teleport location is within the navmesh bounds, and have it red (or orange or whatever) when it is outside of the bounds, but still hitting the ground.

PS: thanks for this awesome library, I'll definitely be using it!

Video: Multilevel Teleporting, Raycast Blocking, and ProBuilder Basic

Previous Video: https://youtu.be/BMcOXQsUHlM

In this video, I demonstrate multilevel teleportation using the Vive-Teleporter asset and how selective raycast blocking can be used to cheat a teleporter underneath irregular surfaces. I also discuss how ProBuilder Basic's "Set Collider" option makes creating invisible teleportation surfaces a slightly faster process.

Vive-Teleporter on Github: https://github.com/Flafla2/Vive-Teleporter

ProBuilder Basic: https://www.assetstore.unity3d.com/en/#!/content/11919

I'm using the version of Vive-Teleporter from 6/20/2016. As Flafla2 continues to update his Vive-Teleporter project the content of this video may become incorrect or obsolete.

Unity version 5.4.b21
SteamVR plugin for Unity - v1.1.0

Recorded using XBox Game DVR

Teleporting Halfway into the ground?

I've gone through the setup steps numerous times, I've tried moving my floor up and down as well, and everything seems to be working like normal, except the ground is always about chest-high after I teleport once, and I remain at that height after subsequent teleports. I'll note that the indicator circle where you're supposed to end up is displayed at the correct height. The parabola, though, falls through to a lower point.

At first I thought it might be because I scaled my Main Rig object up to twice its original size, but after scaling it back to default the issue remains.

I've been able to "fix" it by changing this line in the TeleportVive script:

offset.y = 0;

I simply changed the value to .75f;
This still leaves the parabola pointing lower than my actual floor, but everything else works as I'd like to. I'm just wondering at this point if its an issue with my own setup or something else.

EDIT: I've realized this is probably intended functionality. I was under the impression your script would land the whole rig on top of whatever ground you used for the navMesh. Rather than requiring users to position their world around this script, perhaps you can add another optional variable for where the ground position is?

Generate the border dynamically (temporary solution provided)

Updated 11/17/16:
I copied the functions u provided in ViveNavMeshEditor into a customized script I made and simply modified it to be able to call in runtime. Using the NavMesh Obstacle component in Unity I'm able to change the border dynamically.

Still, hope this function will be provided in the project in the future :)

PS. If anyone needs the same function I could send u the script I made as a temporary solution. It's clumsy, though.

Changing Alpha doesn't seem to work?

Not sure if I'm just doing something wrong (Likely!)

But I have tried to change the Border Alpha slider but it had no effect in game. Also the ground Alpha slider can't be modified.

I wanted to make the grid translucent so it doesn't show up as much in dark environments.

Teleport button pauses the unity window instead of teleporting.

Hi guys, I used Taylor Shockeys youTube tutorial to thy this out [https://www.youtube.com/watch?v=uDwAIveGDU0]. Everything seems to work except when I Play to test. I see both controllers and the touch pad inticator when touching, but when I press the button to use the teleporter it just Pauses Unity and the HMD goes back to my Vive main scene. I went through the tutorial twice to make sure I followed all the instructions. Any ideas what the issue could be?

Unity 5.6 dynamic navmesh support?

Maybe I'm just doing something wrong, but I haven't been able to get this working with Unity 5.6's dynamic navmeshes: https://github.com/Unity-Technologies/NavMeshComponents

Here's my procedure:

  • At runtime, I'm adding a NavMeshSurface component to a plane.
  • In scene mode with the game paused, I'm pressing the Update NavMesh Data button on the ViveNavMesh component.
  • Back in play mode I try to teleport and just get the red x.

My plane has a MeshCollider.

This would be useful in situations where the walkable ground changes within the scene dynamically.

Any ideas?

Orange Indicator Circle Sometimes Present

Hi All,

Came across an issue where the orange circle would seemingly only appear in certain spots, even with colliders present overlapping the navmesh.

I fixed the issue and thought I would share it here. The ViveNavMesh does a check to see if the collided point is close enough to the navmesh, but that threshold is very small which can make it seem like certain parts of your navmesh are not valid.

To make it bigger open ViveNavMesh.cs and go to line 181. The third variable in the NavMesh.SamplePosition call is the threshold. I changed it from .05f to .25f and now it works flawlessly.

pointOnNavmesh = NavMesh.SamplePosition(hitPoint, out navHit, 0.25f, _NavAreaMask);

Thanks to the creator for this awesome plugin!

Parabolic curve is truncated, not working

Thanks for creating this!

I've followed the steps in the readme and was able to successfully bake/update my navmesh (everything looks right in the editor, and when I press the circle pad the selectable area looks good).

The problem I'm having is that while I'm aimed at a valid part of the floor, the parabolic curve is truncated to the length of my controller (only the first few inches of it appear, and interestingly I can feel the haptic pulses as I move the controller around). Once I've aimed outside my area, the full parabola becomes visible. Releasing the circle pad has no effect in either case.

Any advice on things to check would be greatly appreciated! I'm pretty new to Unity and parts of it are a bit opaque to me still.

Avoid needing a special copy of the navmesh

Having prototyped a similar teleport mechanic using Unity's NavMesh API, I had success not requiring a separate bake-and-save of the mesh geometry. All I had to do to make the nav mesh work for both AI and the player was to:

  • Properly set up and query area masks. E.g. add an area mask called WalkablePlayer and flag desired geometry with it. AI agents would then have their agent mask set to both Walkable and WalkablePlayer while the manual queries to determine player destinations would only use WalkablePlayer
  • Put a restriction of the surface normal of a valid teleport destination to avoid being on a slanted area (e.g. Dot(Vector3.up, hit.normal) ~= 1f).

I'd recommend trying this out instead of re-implementing a nav mesh yourself.

Feature Request: Snap Teleporting

Similar to the SteamVR home, adding some way to teleport to a static location if you're pointing close enough to it. For example, if I wanted to teleport to a couch in a living room, without a snap, you could teleport to, say, the arm rest or the head of the couch. With snap, the user would instead have to teleport to either seat 1 or seat 2 of the coach when hovering over the couch. This would be extremely convenient and save me a lot of time trying to figure out your code, then coding my own version of it.

IVRSystem errors

Trying to import the assets into my scene and I get a flood of errors in console about "The namespace 'Valve.VR' already contains a definition for 'IVRSystem'"

Error starts in "openvr_api" line 16 "public struct IVRSystem".

Has anyone else come across this issue?

Using Unity 5.40f3

Missing some mesh filter in pad selection

Hi Flafla2!
Firstly I have to thank you for this teleporter. It is being great for my app.
I don't know why, perhaps something I did not realize when I imported the assets..., I'm missing the mesh filter in the selection-pad prefab (screenshot attached). Do you know what is the asset that fits there?
Many thx in advance
Cheers
missing-mesh

Wall blocks teleport despite being unabled

I have baked the walkable texture onto the ground. Now as I try to walk down corridors, wherever there used to be walls now blocks the teleporter.

There are 5 different mazes laid out over the same scene. They take up the same space, but the walls are different. I toggle each one on or off depending on what maze the user is solving, which might account for the phantom walls. Now I can't seem to get rid of the phantom mesh blocking me from teleporting along the ground.
parabolicteleportissue

Changing Teleport Grid Size

I'm screwing-around with creating a virtual Dungeons & Dragons table where players can touch their token on the table and shrink down to its size. Simply increasing or decreasing the Scale Property of the SteamVR Camera Rig will make the player bigger or smaller in VR - so there's currently no problems in that department. The problem I'm having is changing the scale of the Vive-Teleporter grid. I figure I can adjust the Velocity and Acceleration of the Pointer to get a larger or smaller arc. I can adjust the size and spacing of the dotted-line and probably script the orange circle to increase and decrease in scale accordingly. But for the life of me, I can't seem to make the grid size budge from nine squares per meter.

I looked through all the scripts for default size values and the closest thing I found was (I believe) in the NavMesh Editor script where the Vive-Teleporter NavMesh is serialized from the existing Unity Navmesh. In that script, there's a part of a function that calculates the NavMesh indices as 1/3 of some other value. I believe it's used to create the triangles for the Teleporter Navmesh. What I'm looking for is some variable that - if adjusted - will increase or decrease the size of the squares in the Teleportation Grid. If anyone can point me in the right direction I would be very grateful. Thank you. ๐Ÿ˜„

PS - I apologize for the vagueness of my description. I'm laying in bed and I'm recalling what I saw in the code from memory. If anyone wants me to provide more detail, I would be more than happy to oblige once I'm vertical. ๐Ÿ˜‹

Feature request: ability to turn around

The Oculus Touch has been out for a while and SteamVR supports it just fine. I have a Vive and a Touch rig and I've noticed that teleporting with the Touch requires the ability to turn around somehow. With the Vive you can just physically turn around, but with the Touch you can't turn your back to the camera or you lose tracking.

Through experience and experimentation, I've come up with two possible solutions for this problem:

  1. We could swipe the touchpad (joystick on the Touch) to rotate the teleport facing direction. This is how The Gallery handles it. This solution would require a heading indicator on the teleport circle at the end of the arc.

  2. We could possibly handle heading changes by looking in a different direction, teleporting, and using the rotational delta between forward and the direction the user is looking to rotate the camera after teleporting.

I'm not sure how to implement either of these in the code base. Pointers and ideas welcome.

Changing teleportation distance

Awesome tool, really really useful!

I have a question - what is used to control the distance you can teleport? Currently the model I have has got a relatively small teleporting distance which, when used in a large model environment, means quite a few individual teleports to move across a large space.

Any help would be greatly appreciated!

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.