- Home /
Make a sphere rotate the opposite direction a player is looking in VR
Hi I have a static camera attached to a player. The player is inside a sphere playing a 360 video. I would like the sphere to rotate the opposite direction the camera is looking, so when viewing on cardboard if you look one direction the video will move the opposite. I am a beginner and have no idea where to start. I have been googling for hours and cant figure it out. Thanks!
Answer by FortisVenaliter · Oct 09, 2017 at 06:54 PM
In Unity, all rotations are handled through Quaternions. So, what you probably want is the Quaternion.Inverse() function.
Unfortunately, I am not sure about the code to take the movements from the head and translate them onto the sphere? Then maybe I can use the Quaternion.Inverse() function. Thanks for your answer @FortisVenaliter .
You just need to apply the change to their respective transform.rotation variables.
Your answer
Follow this Question
Related Questions
How can ı attach my camera to object for fps game ? 0 Answers
How to rotate the camera with the player smoothly without the camera snapping back and forth? 2 Answers
Smooth Follow cam; how to keep camera close, but still retain sideways lag/lerp 1 Answer
Can you offset the dead zone of Cinemachine's camera from the center? 0 Answers