Quantcast
Channel: Questions in topic: "post processing"
Viewing all articles
Browse latest Browse all 713

Postprocessing vignette follows player

$
0
0
I use the post processing plugin and want the vignette to follow the player, means: the center of the vignette should always be at the players position. However I get an error, postprocessing vector2 cant be converted into unity.engine vector2? using System.Collections; using System.Collections.Generic; using UnityEngine.Rendering.PostProcessing; using UnityEngine; public class ViewOtherWorld : MonoBehaviour { PostProcessVolume postProcProf; [SerializeField] Transform player; Vignette m_vignette; private void Start() { postProcProf = GetComponent(); postProcProf.profile.TryGetSettings(out m_vignette); } private void Update() { m_vignette.center = new Vector2(player.position.x, player.position.y); } }

Viewing all articles
Browse latest Browse all 713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>