- Home /
How to show game objects from a certain range?
I have a scene with game objects , one of them is the player. The story is I don't want anything to be visible in the screen except for the objects that are at a certain range from the player. How that is possible? Can I use a sphere collider around the player and then everything that are inside the that sphere are visible? It will be recommended if the objects when collide with that sphere don't show the whole object , only the parts that is inside the sphere.
Is your camera moving with your player ?
You can give range to the camera . Only those objects will be seen through camera.
Answer by fafase · Aug 25, 2015 at 08:03 AM
Unity already performs a frustum culling. That is if something is not visible it is not rendered (aka sent to GPU). If that is what you are after, it is done. Note that it might not be done in the Editor since you probably see the object but in the build it will.
What you could consider is to lower the amount of intelligence your agents have. If they are far away, then they may be at rest while closer ones are more active with movement, search or more.
Answer by psycocrusher · Aug 25, 2015 at 08:44 PM
The simplest way is to use a LOD group, and set the culling at the distance you want.
Your answer
![](https://koobas.hobune.stream/wayback/20220612001328im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
Drag and Drop Objects in Game Problem 2 Answers
Object over terrain 2 Answers