Zone View Mousedrag & Background Parallax

This commit is contained in:
hyperion51 2020-03-25 03:15:00 +00:00
commit 6dd43fc193
9 changed files with 113 additions and 5 deletions

View file

@ -5,6 +5,7 @@ using UnityEngine;
public class ZoneRenderer : MonoBehaviour
{
public Camera FollowCamera;
public Material BackgroundMaterial;
public RenderTexture GravityTexture;
public MeshRenderer GravityRenderer;
@ -20,6 +21,7 @@ public class ZoneRenderer : MonoBehaviour
private void OnPreRender()
{
_camera.transform.position = FollowCamera.transform.position;
if (Screen.width != _resX || Screen.height != _resY)
{
_resX = Screen.width;