Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I correct the head rotation I need direction #438

Open
serman33 opened this issue Oct 12, 2023 · 3 comments
Open

How can I correct the head rotation I need direction #438

serman33 opened this issue Oct 12, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@serman33
Copy link

When starting the game on android, the player's camera looks a little to the side. I need to calibrate so that the camera looks where I need it. So to speak, reset to the zero position

@serman33 serman33 added the bug Something isn't working label Oct 12, 2023
@Mandelbrow
Copy link

How about putting the camera in the right direction in the scene from start?

@serman33
Copy link
Author

serman33 commented Oct 16, 2023

Как насчет того, чтобы с самого начала настроить камеру в нужном направлении в сцене?

cardboard-xr-plugin somehow he aligns the position of the head and camera. Therefore, I need to adjust the position of the head so that it looks in the direction that I need. Changing the camera rotation coordinates does not lead to anything.
In my understanding, there should be some command that will align the position of the head, but I did not find it

@Mandelbrow
Copy link

Mandelbrow commented Oct 16, 2023

I believe the camera resets to local euler 0, 0, 0 at start. Put the camera as a child to a gameobject, and turn the parent in the direction the camera should start looking.

You should be able to reset the camera to the start position in the y axis by calling Api.Recenter();
It almost work, but there is a known bug in Cardboard SDK 1.21.0 making it fail if the player is leaning the head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants