- Home /
Oculus Locomotion Teleport - Teleport via Script
I am writing a Demo Scene for Oculus Rift.
It is based on the Oculus Sample Scenes, the one called Locomotion. That one allows for teleportation with the joystick.
Everything works as you'd expect with the original files.
Now, I need to add a "teleport to start" feature, that basically will set the character position back to the start location.
The problem is that when I see the location of the Player Controller via script it teleports, but with strange side effects.
It either bounces of the geometry and you end up thrown in some corner (that is my best understanding of what seems to be happening).
OR
The character fall through the geometry.
I have copied the code from LocomotionTeleport.cs::DoTeleport() and just put in the "home position" instead of the position of the teleport target selection.
There is line of code there:
LocomotionController.PlayerController.Teleported = true;
If I uncomment that my teleport falls through the geometry. If I leave it, it bounces around.
I have no idea how to debug this. So any help / insights into how to "properly do teleport via script" is welcome.
Your answer
![](https://koobas.hobune.stream/wayback/20220612194041im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Why won't my teleport script teleport the gameObject/Character to the right position? 1 Answer
How do the Locomotion System 'motion groups' work? 1 Answer
Understand how locomotation system works 1 Answer
2D - Creating a basic teleport system 0 Answers
Why isn't my teleport on collision script working? 0 Answers