• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Baxet · Sep 15, 2013 at 08:42 PM · cameraclippingpersonfirstarms

1st person arms still clipping with near plane 0.01

Hello. I have a problem with my first person arms. They are still clipping with camera (I can see the "insides") even though I have set the near clipping plane of camera to 0.01. Do you know how to fix the issue? Maybe it has something to do with model? I'm using blender.alt text

screen.png (402.8 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
5

Answer by aldonaletto · Sep 15, 2013 at 09:05 PM

Don't set the near clipping plane distance below the default 0.3! Low near plane values result in quite noticeable Z-fighting: overlapping objects beyond some distance flick their contours crazily when you move or rotate the camera. Anyway, this should solve your problem (despite creating another one): if it isn't working, something else is setting the near plane to the original value

A possible solution is to modify the camera position so that the near plane doesn't touch any part of the body - it's easy to see the near plane in the Scene view. Another possibility is the two camera approach: place the body in some specific layer and disable this layer in the main camera; add a second camera with higher depth and enables only this layer - you can use a low near plane distance in the second camera, since it only renders the player.

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Baxet · Sep 16, 2013 at 12:13 AM 0
Share

I have the two cameras approach already. So it isn't the problem with near plane being set too close.

avatar image aldonaletto · Sep 16, 2013 at 12:49 PM 1
Share

So, you're already using the 2-cameras approach - this should solve your problem! Since it isn't, something else is wrong: the closer near plane is being set in the wrong camera, or something in the code is restoring the original 2nd camera near plane, or the main camera is rendering the player too and hasn't a lower depth etc.

Let's check the basics: create a new layer (let's call it PlayerBody) and move the weapons and the player body to it; create a new camera (remove its AudioListener) and set the fields Depth = 1, Clear Flags = Depth Only, Culling $$anonymous$$ask = PlayerBody, Near = 0.01; child this camera to the $$anonymous$$ain Camera and reset its position/rotation. In the $$anonymous$$ain Camera, the only change is the Culling $$anonymous$$ask, where everything but PlayerBody must be marked. Check these settings carefully - they always work fine, thus you must have missed something.

avatar image UnityFan18 aldonaletto · Dec 26, 2016 at 01:13 AM 0
Share

Thank you for this answer, I know its three years later, but this answer really helped me understand why I was having clipping issues. Thanks again and it helped me to eliminate the players flashlight from clipping against the walls.

avatar image Baxet · Sep 16, 2013 at 02:11 PM 0
Share

Thanks for your answer, but I double checked everything and it is set exactly like you mentioned. Could it be some kind of problem with the 3d model?

avatar image aldonaletto · Sep 19, 2013 at 03:45 AM 0
Share

No, this is clearly caused by near plane clipping. Try to eliminate suspects one by one. For instance: while the game is running, disable the second camera in the Editor - the player body should disappear; if it doesn't, the depths are wrong and the main camera is covering the second one, or the layers are incorrectly set and the player is being rendered by the main camera. If the player disappears, then the second camera's near plane must be the culprit. Pay attention to public variables: the Editor keeps the last values set, even if we change them in the script - if you're setting the near plane to the value defined in a public variable, it may be keeping some old and incorrect value.

avatar image
1

Answer by stuart_jackson1992 · Jul 15, 2014 at 11:40 AM

Eric 5h5 answers your issue here if this helps

http://forum.unity3d.com/threads/can-i-disable-culling.43916/

Worked for the similar situation I was having!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Mecanim Fps Shooter? 3 Answers

How to make a world model apear seperate from a player model 0 Answers

Make FirstPersonCam follow car direction 1 Answer

Rotate charcter with camera? 1 Answer

How can i make change the First Person position by clicking a Buttom? 3 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges