Fixed quad height
This commit is contained in:
parent
f6fd5798b2
commit
57c9a8f643
@ -3183,8 +3183,8 @@ MonoBehaviour:
|
||||
renderQuad: {fileID: 2080936950}
|
||||
material: {fileID: 0}
|
||||
layer: 9
|
||||
tabWidth: 0.05
|
||||
quadOffset: 0.87
|
||||
tabWidth: 0.2
|
||||
quadOffset: 1
|
||||
--- !u!1 &1385339222
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -148,7 +148,7 @@ struct WorldInfo {
|
||||
if (usingTexture)
|
||||
camera.targetTexture = null;
|
||||
|
||||
float height = 2f * Mathf.Atan(Mathf.Deg2Rad * camera.fieldOfView) * quadOffset;
|
||||
float height = 2f * Mathf.Tan(Mathf.Deg2Rad * camera.fieldOfView / 2f) * quadOffset;
|
||||
renderQuad.localScale = new Vector3(camera.aspect * height, height, 1f);
|
||||
texture = new RenderTexture(Screen.width, Screen.height, 32);
|
||||
material.SetTexture(CameraTexture, texture);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user