So i want to achieve walls like diablo that parts of it disappear if it is blocking the sight to the player or any other AI character
I did read this:
http://forum.unity3d.com/threads/76310-Diablo-style-walls-that-become-visible-hidden-depending-on-the-character-s-location
but it provided nothing important other than this Visibility bubble thing:
http://forum.unity3d.com/threads/130480-Visibility-bubble-Titan-Quest-like
Which i completely dont understand:
"You have it mostly right, this kind of effect probably requires you to render the scene twice if you want things like dynamic shadows to work. Have your second camera draw into a separate render texture and then have the main camera composite that back on top of the scene. The simplest way would be to make a post processing effect that simply draws the second render texture with an alpha mask.
If you don’t need shadows casting on the rocks then you could probably get away with putting a shader on the rocks that alpha blends using a screen space mask. The surface shader example section of the documentation shows how to sample textures in screen space, just set the alpha to the mask texture value."
I wasnt able to understand any of this since i have no experience with shader programming so can anyone please explain what exactly should i be doing to achieve this wall system?
PS: I have unity free so i am not worried about shadows or anything like that if it matters. Also I am using the bird eye view camera and not the third person view one…
ForceX
November 7, 2012, 3:07am
2
From : Diablo-style walls that become visible/hidden depending on the character’s location
Chris Sinclair : Best I can figure is to do a Physics.Raycast between the camera and the player. If the ray hits the wall instead of the player, you can then alter the wall’s materials (or swap its visibility with a transparent one) accordingly. I’m sure someone will be able to provide more in-depth thoughts, and I’m 99.9% sure something like this has been discussed/implemented before somewhere.
From : Diablo-style walls that become visible/hidden depending on the character’s location
That is where i would start. Draw a ray from your player to the camera. If the ray hits a wall then disable it’s renderer.
ForceX:
From : Diablo-style walls that become visible/hidden depending on the character’s location
From : Diablo-style walls that become visible/hidden depending on the character’s location
That is where i would start. Draw a ray from your player to the camera. If the ray hits a wall then disable it’s renderer.
Sounds like the best choice right now :), Thanks ForceX