- Home /
Question by
BigBlob · Feb 13, 2012 at 04:45 AM ·
cameraplayertransparency
Camera Transparency
How can I make my camera to make objects 50% transparent when it goes right in front of something. Like in many games the objects gets transparent so the person can see the character.
Comment
Answer by asafsitner · Feb 13, 2012 at 02:51 PM
Raycast directly from the camera forward. If it hits an object, access that object's renderer component, go to color and set the alpha channel to 0.5
Obviously you'll want to use collision layers to avoid turning your character or terrain or whatever you don't want transparent.
Your answer
Follow this Question
Related Questions
Make object transparent when between camera and player 11 Answers
Player rotates with camera(face same direction as the camera) 1 Answer
MiniMap with player and object icons 1 Answer
Camera problem 2 Answers