- Home /
Don't cull objects in a certain area
In my game I need to make it so that a camera only culls an object if it is not between the camera and another object regardless of the rotation of the camera. What I essentially want is to be able to keep the near clip plane right up against an object while still being able to move the camera in what ever rotation I want. Look at the picture below. Thanks for any help.
http://s1106.photobucket.com/albums/h379/macdude22/?action=view¤t=pic.jpg
no body has any thoughts on this? Can I just render what is inside or outside a collider?
Do I really need to have an array with all the positions of every object in my scene and then change the layers of these objects depending on where I put my camera?
The lack of answers probably means that people aren't really sure what you mean and can't figure out what you're trying to do; at least that's my reaction.
I am asking how it is possible to tell a camera to only render objects are not in a certain world space. How could I tell the camera I don't want it to see anything in my scene that has an x value between 0 and 1?
if(transform.position.x > 0 && transform.position.x < 1)
//disable the renderer
Answer by Dreamora · Jul 24, 2011 at 11:03 PM
you can't disable culling when it takes place.
all you can do is prevent stuff from rendering by disabling them if they are within the view frustum (in front of camera and within the near clip - far clip interval) if you are not on unity pro and have occlusion culling baked, frustum culling is the only form of culling that is going to take place and which you have to keep in mind
Your answer
![](https://koobas.hobune.stream/wayback/20220612153818im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Editor's Camera Clipping Plane 12 Answers
camera near clipping results in z fighting 1 Answer
Polygons clipping at edge of screen 1 Answer
Weapon / Viewmodel clipping shader methods 0 Answers
Unity (5) Scene camera Clipping 3 Answers