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?
Related
I am learning how to make games using unity, i have used free sprite packs from unity's store.
i have selected each individual sprite and changed its z position to 0, but when the game runs it looks completely different to how it looks in the editing window.
please help.
Here is a video I recorded.
https://youtu.be/2hb9m01PQBk
Are your sprites on a prefab, or children of another game object? The Transform of the parent object affects the transform of all children.
It looks like this is a camera problem. Your camera is set to perspective, it is possible to do parallax backgrounds with a perspective camera and you may have already accomodated for it, but that is the first thing I would check.
You can modify this by going to your Main Camera and selecting Orthographic from the Projection drop-down menu.
When I drag and drop a particle prefab into scene it shows on the scene view and also shows in the game view
But when I maximize the game view all particles turn off
How can I fix that?
This is a question about particle system bug :V, you can use this link to fix your problem
Link
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.
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.
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