fix-portals #1

Merged
LOLthecool merged 4 commits from fix-portals into main 2024-02-07 19:53:18 +01:00
4 changed files with 5565 additions and 412 deletions
Showing only changes of commit 6e21b12710 - Show all commits

6
.vsconfig Normal file
View file

@ -0,0 +1,6 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Workload.ManagedGame"
]
}

File diff suppressed because it is too large Load diff

View file

@ -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);
} }
} }

View file

@ -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 ();