- Home /
using layers to mask where a player can see.
So I've seen the boat tutorial showing how you can use layers to mask out things, IE making the water invisible in the boat. Basically, if you're looking through the object with the correct layer, the masked surface behind it disappears. What i want to do is use a plane with a layer to view things. So when i look through it the masked objects appear. So say we use the boat tutorial as an example. The water should be completely invisible in everything except the boat.
The reason i'm trying to do this is for a simulated reflection. I have a flat plane on the ground. I also have two cameras, the main camera for players vision and a reflection camera at the same height, but negative. So the player is 6 ft tall, and the camera is 6 ft below the characters feet. I have it so that when the main camera looks down, the reflection camera looks up. So that the centers of vision intersect exactly at the ground at all times. All i need is it to be set up so that on the plain the main camera's vision is overwritten by the reflection camera. So that on that plain, we see where the other camera is looking upwards.
I know i'll have to do some adjusting of camera position and whatnot after to make sure the angles are right, and it's inverted correctly. But in order to play around with that i need to be able to see what i'm supposed to.
Thank you for any help.