Camera is in different position when build .exe(UNITY) - unity3d

I'm using a google cardboard camera (GVRMAIN) and it is placed in the center of my gameobject when i build it it goes up. It is now in different position from the game view in unity. Help me guys please

Maybe your scene gets scaled up or down on the device and the gameobject moves its position from to original position in the unity editor. So if the camera is attached to the center of this gameobject it also changes positions.
You should attach the camera to a gameobject thats always staying on the same position regardless of the current aspect ratio.

Related

Unity 3d Cinemachine Target Lock Camera Pointing at Floor

I'm creating a target lock on camera using Cinemachine similar to Dark Souls.
When the character gets too close to the target, the camera keeps rotating till it's looking at the floor and ignores the bounds of the frame.
Also if anyone knows if theres a way to clamp the rotation of the Cinemachine camera while aiming at a transform that is offscreen?
Youtube - Unity 3d Cinemachine Target Lock Test
Cinemachine Inspector Settings

Main Camera is resetting its position in unity

I'm new to 3D game development and I'm trying to make a 3D game in Unity v2019.4.39f1.
I'm facing a problem with the main camera's position.
I made the main camera to be a child of a game object so that it follows it. This is the hierarchy of the main camera.
Main Camera Heirarchy
I initially set the position of the camera as shown in the figure.
Transform before starting the game
But during the gameplay, the main camera's position is always reset to the one shown in the following figure.
Transform after starting the game
Can someone please help me fix this?

Unity coordinates doesn't work

I'm very beginner in Unity so please forgive if, this questions isn't so hard to answer:)
So, I have a text on a Canvas in the editor, it is okay, it's showing well on Scene editor and In Game as well.
But, when I added two Sprites, which going to be the player and the enemy, the positions of these sprites are behave a bit weird.
The text position is: x: -293 y: 195, when I'm modifying the position of the text it works fine.
When I add the sprites to x:0 y:0 and x:1 y:1, in the scene editor they appear in the left bottom corner, but when I check in the game, they placed in the middle of the screen.
My question is why the coordinates and the positions are so different on Scene (grey) and on Game (blue) ?
Because initialized render mode of Canvas in Unity is "ScreenSpace - Overlay". So it is shown on too big area in scene. If you want to work only in view field of camera, in inspector just change render mode of Canvas to "ScreenSpace-Camera" and drag your MainCamera to RenderCamera in inspector. Even if you use ScreenSpace-Camera, coordinate system of RectTransform (UI Objects transform) is different than Transform (Normal game objects transform)
in this view, if you get closer to the left-down corner of your scene, you will see your main camera area and Sprites that are in correct positions.
I hope this helps.

sync position of Unity camera to physical position of tango

I'd like to have a my camera in the unity scene start where the Tango is positioned in a room. I have an ADF set up and it's loading correctly. The problem is the camera and pose controller are always starting at 0,0,0 in Unity.
If the tango is activated in the left side of the room I'd like the Pose in Unity to start at that left side of the scene, with respect to the ADF file.
You can set the object positions to the position of tango using using a script on the camera and placing the logic in the Start() function.

Unity 3D with Vuforia AR: Adding a Gameobject to ARCamera View

I am using Unity3D with extension of Vuforia. I am working on Cylindrical targets. When ARCamera detects the image and starts the augmentation, I want to show my GameObject (.fbx file, imported into the Meshes folder and created a Prefab out of it) on the screen.
I am working in Unity C#.
I attached a script to the GameObject and initialized it DefaultTrackableEventHandler Script. When I run it in Unity and the camera starts, I don't see my object in the Game View. Whereas in Screen View, I see that bottle (Prefab) rotating.
make sure the camera, or the focal point has your object in sight, when i tried vuforia, rotate your card slowly 360° to see if you can see the object, also your object could be far above what you expect, I would recommend very long expanded cubes in the 3 axis, to get the reference in the augmented world, then move from there