Image target rotating on play - Unity - unity3d

I've been tearing my hair out with this one all week. I am building on Unity for Android, and every time I press play to test my project with my webcam, when it detects the image target, it seems to change rotation! I'm not sure if this is supposed to happen, but my problem is manifesting with my Skybox not rotating with the image target, so my scene is all messed up, instead of my sky being up, it's sideways, if that makes sense. If you help me solve this you will forever have bought my friendship and loyalty, lol, seriously though, I'm losing it, it was working fine before, please help me. Alan.
I am using Enviro for my skybox, I tried rotating it and the camera, I installed a new version of Unity, deleted cache, and tried writing a script that rotates the skybox with the camera, I'm terrible at coding, but nothing seems to be working.

Related

Unity 2020.3 When I click play sometimes it shows my game upside down

I use Unity 2020.3.8f1. I've developed a scene with an FPS controller so it can be walked through. Yet, sometimes when I click play, the scene shows upside down and sometimes the camera is looking at the sky or off to the side. It doesn't happen always, just randomly at unpredictable moments and looking in different directions. Does anyone have any idea what is going on?
It happens only with this one file. I've created other scenes with FPS controllers to walk through that have always worked with no problem. With this error=prone walk through, there are no errors in the console and no error messages appear on screen. The scene was built with prefabs, so the only scripts are the ones that come with the FPS Controller.
Thank you,
Michelle Jensen

Why sometimes ImageTarget isn't recognize?

I'm using Vuforia with Unity and I try to track an ImageTarget( that with stones from Vuforia site). The problem is that sometimes (in 20-30% of cases) it takes like 10-20 seconds to recognize the ImageTarget even if I put it very clearly in front of the camera. Other problem is when the ImageTarget disappears from the scene and reappears sometimes works perfectly sometimes not. Any suggestion why this is happening? (I'm new in Vuforia)
If its default project without your scripts - then may be quality of your camera is not enough to track correctly image targets all the time. Also vuforia sometimes has bug with loading resources with image targets but if you do not reload app and image been tracked it is only quality of your camera.

Unity crashes when changing scenes in the editor but not when built

I am currently developing a game for the Vive using Steam VR. After updating to 5.5, Unity is freezing when I try to load into roughly half of my scenes when playing in the editor (I have not made any changes), but when I build and run, Unity does not freeze and everything works as would be expected.
I have gone as far as removing all game objects from a scene and replacing the vive camera rig with a unity camera and clearing all baked data, and even then, when I load into the empty scene the Unity editor will still freeze. This is very strange because I can load into some of my other scenes without them being affected.
One thing that I have noted is that the affected scenes that I can not load into I have heavily been working on in 5.5 and not so much in 5.4, so perhaps there is something there?
All of the scenes use the same prefab for a character controller, and the only scripts in my scenes are attached to that. I am really at a loss here. Any ideas or thoughts about things I can try to resolve this would be much appreciated!
As I stated previously, the game builds and runs completely fine, but the editor in play mode freezes when loading into some of my old scenes, even after removing everything from them and only leaving in a Unity camera object to sum it up.
I also have deleted the library folder and reopened my project with Unity and this did not fix it either.

Physics messed up with cardboard scene in Unity

I am in the process of putting together an app using the Google Cardboard SDK. The user will be able to use the app with or without cardboard. So, there is a switch button inside the app, that activates and deactivates stereo rendering.
The app also uses the Vuforia SDK to track image targets. If a specific target is recognized, some 3D objects above the target and a particle system starts to emit particles.
Everything works fine in non-stereo mode. Particles are emitted and falling correctly as intended. They should simulate snow. Also if the user turns the image target to an angle, the 3D objects above fall down.
When switching to stereo mode, the physics are messed up completely. The snow particles are not falling anymore, they seem to "teleport" around the screen. Also the 3D objects do fall upwards, with a really heavy negative gravity. Timescale seems multiplied several times, but is not - I double checked that. Gravity also does not change when switching between non-stereo and stereo rendering.
Everything works fine in Unity Editor in moth modes. It only appears on the device, which is an iPhone 5.
Cardboard SDK is version 0.52, which is the newest.
Unity is version 5.3.1.
Vuforia is 5.0.6, which is not the newest, but release notes do not indicate a fix concerning physics. Will update it anyway as a next step.
Vuforia is 5.0.10, which is the latest version.
I double checked gravity and timescale, which are not changing when switching between modes. I have a hard time figuring out what might cause the physics to mess up.
EDIT:
I did some further investigations. I made me a little gizmo sitting always in front of the camera but getting the rotation of the Unity world space axes, so I know the 3D-world is oriented in relation to the camera. And it turns out, that when in VR mode with the Google cardboard camera system, the world does spin around the camera heavily. I managed to hold the test device in a way, so it is slowing down and almost freezing, but I have no explanation for the effect yet.
I managed to get my setup right again. Unfortunately I did not find the source of the weird behavior. But By deleting the Vuforia Prefab and the Cardboard Prefab and adding them again to the scene, the problem was solved.

Unity Screen Resolution after build .exe Issue

So I'm trying to make a game in Unity, and everything is fine, the screen resolution on the Game and Scene view are perfect and well adjusted for every aspect ratio, but after I build the game, and execute the built version of it, the resolution goes crazy.. Before executing the game, there's an option to change resolution but all of them won't work!
I only see 1/4 of the game, it's like the game is being pushed down and to the right.
How can I fix this? Am I missing anything obvious here?
I fixed it.
All I had to do was add a main camera to the scene, I thought since I had the UI canvas I didn't need a camera but I was wrong.
Now it's all working perfectly.