- Home /
Rendering sword on top doesn't work?
I've made two cameras. Here is the hierarchy setup:
On the first camera I have Culling Mask to everything except my sword, Depth of 0, and the rest of the settings the same.
On the second camera I have "Clear Flags: Depth Only", "Culling Mask: Sword", Depth 1, and everything else the same. The problem is that when I position my sword in front of the second camera and play the game, the sword still isn't rendered on the top:
Answer by Zhinkk · Apr 02, 2013 at 09:05 PM
Hmmm I think I fixed my problem by changing the Clipping Planes Near to 0.01. Now I am able to completely see the sword and it renders over everything.
ok good job, but next time post a comment and not another 'Answer'
If the question is answered it should be an answer. Just be sure to mark it correct next time too.
Answer by KMKxJOEY1 · Apr 01, 2013 at 09:09 PM
check if the sword is animated, animation holds position data and may be moving the sword away from the camera
Answer by Polinator · Apr 01, 2013 at 10:03 PM
For my game, I have both the weapon and the second camera as a child of the main camera. You should see if that does it. I think the rest of my settings are the same as what you described above.
he already fixed it, and parenting cameras wont do anything useful in this situation
Your answer
Follow this Question
Related Questions
Setting Material Tag at runtime for replacement shader tricks 1 Answer
What order are a mesh's triangles rendered in? 0 Answers
Looping Renderer 1 Answer
Drag and Drop problem with order of UI items (behind others) 2 Answers
Black background issue in AR scene after adding Lightweight render pipeline effect. 2 Answers