I created many obstacles as part of my game scene. I want hide or destroy certain part of these obstacles based on their position. Is it possible to destroy/hide part of an object which lies beyond a certain position?
Hide and destroy are two very different things.
like Josh said, OcclusionCulling is probably want you really need. (Pro Only)
if you want to simply hide, disable the renderer
if you want to destroy, just call destroy() in your script
A certain position in a specific domain or just something like it’s x unit away, destroy it ?
simple example
var part: GameObject;
function Update () {
//Change this condition to what you actually want
if( transform.position.x < 0 ){
//disable the renderer
part.getComponent(renderer).enabled = false;
//or Destroy the object
Destroy(part);
}
Hope that helps