Hot answers tagged

4

A higher Depth-setting means that the camera will rendered above cameras with a lower Depth-setting. As you have currently configured your cameras, the orthographic camera is drawn first and the perspective camera above it afterwards. Set the depth of the foreground-camera to a higher value than that of the background camera. When you do that, you will only ...


2

This is a strange behaviour in Unity's scale inheritance system. If the parent has a non-uniform scale, when you rotate the child, they deform/stretch like a rubber band. Try adding an empty child GameObject to Player GameObject and parent the Camera GameObject to empty one, and put the rotation script on Camera. This makes parent of the Camera a ...


2

You can do this with two cameras with different culling masks. When you have multiple cameras in your scene, each camera will be rendered separately. The culling mask decides what will be rendered by the camera. Then the output of all the cameras get drawn on top of each other in order of their "Depth" value. Click on "Layers -> Edit Layers" and create a ...


1

So I guess you could save like the last 10 rotations in a List and get the average of them with this function. The function return could be set as your final rotation. This should smoothen your rotation. private Quaternion calcAvg(List<GameObject> rotationlist) { if (rotationlist.Count == 0) throw new ArgumentException(); float x, y, ...



Only top voted, non community-wiki answers of a minimum length are eligible