Zone View Mousedrag & Background Parallax
This commit is contained in:
parent
4221f304f1
commit
6dd43fc193
9 changed files with 113 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue