fix-portals #1
6
.vsconfig
Normal file
6
.vsconfig
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"version": "1.0",
|
||||||
|
"components": [
|
||||||
|
"Microsoft.VisualStudio.Workload.ManagedGame"
|
||||||
|
]
|
||||||
|
}
|
File diff suppressed because it is too large
Load diff
|
@ -9,6 +9,6 @@ public class PositionSync : MonoBehaviour
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
transform.rotation = targetGameobject.transform.rotation;
|
transform.rotation = targetGameobject.transform.rotation;
|
||||||
transform.position = new Vector3(targetGameobject.transform.position.x, targetGameobject.transform.position.y + 0f, targetGameobject.transform.position.z);
|
transform.position = new Vector3(targetGameobject.transform.position.x, targetGameobject.transform.position.y + 100f, targetGameobject.transform.position.z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,14 +17,13 @@ public class WorkingPortal : MonoBehaviour {
|
||||||
|
|
||||||
// Private variables
|
// Private variables
|
||||||
public RenderTexture viewTexture;
|
public RenderTexture viewTexture;
|
||||||
Camera WorkingPortalCam;
|
public Camera WorkingPortalCam;
|
||||||
Camera playerCam;
|
Camera playerCam;
|
||||||
Material firstRecursionMat;
|
Material firstRecursionMat;
|
||||||
MeshFilter screenMeshFilter;
|
MeshFilter screenMeshFilter;
|
||||||
|
|
||||||
void Awake () {
|
void Awake () {
|
||||||
myGameObject = gameObject;
|
myGameObject = gameObject;
|
||||||
WorkingPortalCam = GetComponentInChildren<Camera> ();
|
|
||||||
WorkingPortalCam.enabled = false;
|
WorkingPortalCam.enabled = false;
|
||||||
screenMeshFilter = screen.GetComponent<MeshFilter> ();
|
screenMeshFilter = screen.GetComponent<MeshFilter> ();
|
||||||
screen.material.SetInt ("displayMask", 1);
|
screen.material.SetInt ("displayMask", 1);
|
||||||
|
@ -66,6 +65,7 @@ public class WorkingPortal : MonoBehaviour {
|
||||||
|
|
||||||
for (int i = startIndex; i < recursionLimit; i++) {
|
for (int i = startIndex; i < recursionLimit; i++) {
|
||||||
WorkingPortalCam.transform.SetPositionAndRotation (renderPositions[i], renderRotations[i]);
|
WorkingPortalCam.transform.SetPositionAndRotation (renderPositions[i], renderRotations[i]);
|
||||||
|
Debug.Log(string.Format("rendering at: ", renderPositions[i].x, renderPositions[i].y, renderPositions[i].z));
|
||||||
SetNearClipPlane ();
|
SetNearClipPlane ();
|
||||||
WorkingPortalCam.Render ();
|
WorkingPortalCam.Render ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue