Newer
Older
IsoRenderTest / Assets / IsoObject.cs
@Mark Mark on 31 Oct 2019 537 bytes More work on editor setup
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class IsoObject : MonoBehaviour {
    public Camera IsoCamera;

    private Material isoMaterial;
	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		
	}

    void LateUpdate()
    {
        Vector3 viewPos = IsoCamera.WorldToViewportPoint(gameObject.transform.position);
        isoMaterial.SetVector("_CenterPoint", new Vector4(viewPos.x, viewPos.y));
    }
}