• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
Question by SEVO · Mar 11, 2019 at 05:12 PM · movementvrsteamteleporting

SteamVR Teleport onto moving object

Hello community

I am trying to teleport onto moving objects using the provided SteamVR Teleport prefab, teleport areas are working fine, but I don't know where the events for Teleport are located or how to parent the Player prefab to the $$anonymous$$t object correctly using the normal vector of the teleport area? (an object could have a valid areas on the bottom).

I have a plan I intend to try, going to place a trigger at the players feet, when it $$anonymous$$ts a new object it tests to see if is a new object containing a teleport area, the sets that as its parent, then set the player rotation to match the teleport areas surface normal as UP.

Good idea? or is there already a script in the SteamVR tools?

Thanks for any advice in advance.

Comment

People who like this

0 Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SEVO · Mar 11, 2019 at 05:31 PM 0
Share

This plan to parent the player has not worked, SteamVR Teleport breaks if the player prefab is parented to anything?

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by SEVO · Mar 15, 2019 at 02:59 PM

So here is an update, I have been editing the stock SteamVR scripts just to figure out a quick and dirty solution:


  • Parenting the SteamVR Player prefab only breaks if the parent is set inactive, no crashes, it just turns off the camera. I did t$$anonymous$$s in Teleport.cs -> TeleportPlayer(), I got the teleport area's transform (inactive) and then got it's parent transform, then parented the player to that.

  • Player prefab can be effected by local scale of parent transform, be sure to either have a parent with 1,1,1 scale or to do the "player.trackingOriginTransform.localScale = player.trackingOriginTransform.localScale;" trick, t$$anonymous$$s seems to allow the Player prefab to maintain it's own scale (it works, don't know why).

  • You can set the player's rotation on the new parent by grabbing the rotation of the teleport area and setting the player.trackingOriginTransform.rotation to be the same, t$$anonymous$$s needs to be world space rotation!

  • Turn of the teleport arc gravity to prevent weird issues cause by the player now being stuck to walls, there is no toggle, in Teleport.cs find the teleportArc.SetArcData() method and change the gravity argument to false, it's a quick fix.

  • You can also fix the orientation of the target point of the teleporter in Teleport.cs in the UpdatePointer() method, I copied the orientation check from the invalid pointer. Using the same rotation on the PlayAreaPreview does work, but it also seems to spin it around the teleport marker very slowly.


T$$anonymous$$s is not my final solution, it is very hacky and needs to be cleaned up, but it does work as intended. I will update my Repository and link here later, with the hacky code. I hope t$$anonymous$$s inspires someone to do t$$anonymous$$s better than me :)

Comment

People who like this

0 Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SEVO · Mar 15, 2019 at 03:35 PM 0
Share

Here is my repo, I cut out the space Skyboxes to save space, and they are not mine to distribute: Git repository

avatar image SEVO · Mar 19, 2019 at 10:56 AM 0
Share

Well now I'm stumped, I cannot override the SteamVR scripts with neat extensions due to most of the functions being Private. My only working solution is modifying the existing Teleport.cs script :(

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

249 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

VR Teleporting on any object 0 Answers

Steam VR Teleport Reticle Off Set? 0 Answers

SteamVR Interaction system. Small problem with Teleport points. 3 Answers

Cardboard and Navmesh: Problem with Player Movement 0 Answers

Vector3.SmoothDamp movement gets stuck on Quest 2 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges