Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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
0
Question by PvLi · Aug 17, 2016 at 06:54 AM · rotatepositioningteleport

Move camera diagonally opposite table and reverse look direction

This is driving me crazy. I'm trying to build a table tennis game where you play against yourself and I'm trying to create a function that will take the player from current position to the diagonal opposite side of the table and turn the camera around - the end result that the player changed side but only notices because the ball is now coming towards him - of course this should be a "recurring" function sending the player back and forth. The move should happen instantaneously, i.e. "teleport" - I'm sure you get the idea. I've tried a million things like using math, using rotate, using reflections etc. I've google everything I can think of, looked though a lot of documentation and watched many videos on youtube. I've mostly worked with SteamVR_Render.Top() for the headset position and various point working with the "mirroring", as an example the center of the table. Pleeeeaaaaseeee help - it is driving me absolutely crazy and after having spent 10 hours plus on this rather small thing I'm about to drop the project which was supposed to be fun after all. Your help will be highly appreciated!!

Comment
Add comment · 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 PvLi · Aug 17, 2016 at 07:06 AM 0
Share

$$anonymous$$ight not have been clear from the above - moving the camera/player is easy enough using position properties - it is calculating the vector position diagonally opposite the table I can't figure out.

In addition I have not yet tried to figure out how to turn the view around after having set the correct position - maybe someone would have a hint for that too.

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by PvLi · Aug 17, 2016 at 06:46 PM

Just in case anyone is curious - managed to solve this using position and rotation on the SteamVR_Render.Top()

Comment
Add comment · 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

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.

Follow this Question

Answers Answers and Comments

64 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

Related Questions

Adding a Vector to a position 2 Answers

how to make a 2D player teleport to certain X and Y when they enter a trigger 2 Answers

Teleportation script isn't working correctly when I go through my object trigger, I don't know why. 0 Answers

Rotate OBJECT to face mouse cursor for x/z based top down shooter 3 Answers

More problems with arrow shooting 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