- Home /
Question by
N00MKRAD · Oct 02, 2014 at 12:11 AM ·
shaderimage-effectseyes
Make objects monochrome, and when I come closer, they get color
(Maybe my English isn´t perfect)
I am making a horror game, and the monochrome image effect looks great, but is it possible, that when I come closer to the objects, they get color?
Like in the horror game Eyes.
Thanks in advance :)
Comment
Answer by bubzy · Oct 02, 2014 at 12:24 AM
you would have to calculate the distance and then change the material when it is below a threshold
look up Vector3.Distance
and reference your player and the object.
then
renderer.material
But then it wouldn´t change smoothly, it would be like
frame 1: monochrome
frame 2: colored
And it would look not so good if it suddenly changes.