cancel
Showing results for 
Search instead for 
Did you mean: 

Touch Controller Teleport Gun?

FuriousUnion
Honored Guest
Anybody out there developed a teleport kit for the touch controllers? I have been banging my head against the wall trying to create a teleport system. I need help and I know there are tons of other designers who could use one too.

I know there are several for the Vive but I dont have the coding chops to convert to Touch.

It drives me crazy thinking everyone out there is doing duplicate work, creating the same tool. With my luck, if I ever figure it out, Oculus will drop one the next day as part of an updated touch control dev kit  🙂
6 REPLIES 6

MikeF
Trustee
Assuming you're using unity you could def. adapt vive examples with just a few input changes, but if you wanted to learn how to do it yourself it isnt terribly complicated to put together, even for a novice programmer. You can break it down into three simple parts:
1) Get input
2) acquiring a destination
3) moving to destination

The provided unity examples should show you how to get input from the touch controllers, so thats taken care of for you. For this example lets say you want to teleport with the index trigger. 

When the index trigger value reaches 1.0, perform a raycast (raycast https://docs.unity3d.com/ScriptReference/Physics.Raycast.html)
From the raycast you need to get a Vector3 position from where the raycast has hit and store that into a temporary variable like Vector3 destinationPos;.

Next you need to tell your root player gameobject to move to that vector3 by modifying its transforms
ex: GameObjectToWarp.transform.position = destinationPos;

That should provide the most basic form of teleportation. You can of course take it further by adding some nice line renderer representations of your raycast hit location or some exceptions that limit the kinds of surfaces you can warp to, but this should be enough to get started.

Hope that helps!




FuriousUnion
Honored Guest
Hey Mike  I am using Unity and this all makes sense conceptually. I am definity on the novice end of the novice coding spectrum. My background is design so I have been getting by with cut and paste coding, but this seems like is a good place to start. Thank you for the guidance!


ChrisCas
Protege
I am working on a teleport and movement system let me know if you need any more assistance.

solidsnake4444
Honored Guest
I'm wondering how to get an arc for a teleporter, similar to The Lab.

Bino
Protege
UE4 has a this coming up in the next release. You can check out the preview builds. I imagine you could study the BP and adapt it to Unity. There's really not much involved to get this up and running.
CRT-X (Hotline Miami inspired VR shooter) https://forums.oculusvr.com/community/discussion/80394/dr-lucky-duck/p1?new=1 https://twitter.com/superteamone https://www.instagram.com/superteamone/

Toukokuu
Protege
With Unity you can use Line renderer with basic arc/trajectory math