Hi,
I am trying to make a Slender game, and I have this script to show static on the screen when you look at the Slenderman for too long, but when it displays it, it only shows it on the lower half of the screen and if I look up and down, I cannot see it. Here is what I mean:
Here is the script for the static:
// script has now been removed
Any ideas? Any help is appreciated. Thanks!
The script has now been removed. To future readers, follow the instructions as given by sparkzbarca and No1Survivalist :
Use a plane. Position and scale it to cover the front of the camera
remove the collider
add your material
give the material a shader that uses the alpha of the color in the material (eg a transparent shader, a shader with transparency)
This is my script. It creates a mesh that extends to the full view fustrum. Basically it displays an image for the whole screen, and the alpha can be controlled. To make it work, you must make the script object a child of the camera … simple.
As I said where you saw this script, for all questions regarding the guide, ask on the question I posted the guide
Ok so i think this is probably the best way to do it personally. On your fps controller make a collider, a cube will do. Extend this out about 15 meters from you fps character. Make the mesh invisible. Then attach it as a child of the camera so it moves where you look. Add the script below to a cube collider which is around slender, again make it invisible and a child of slender. Attach the cotect gameobjects in the inspector menu to the script.
Now you need a gui texture. So get some static put it on phtotshop and turn opacity down a little bit so you can see throug hit a little, allowing you to see slender. This is the guitexture you want to use in the script.
So basically this is the idea
Collider on fps controller hits the collider on slender
plays the gui texture // for how many seconds, change in code
If you want sound attach a audio source to the collider on slender and the following script. SO this sound will play when they collide. i.e your looking at slender
Static image
also disable the gui texture and on the fps walker in inspector tag player