Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411423 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 18, 2024, 09:34:42 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Polygon Dropout
Pages: [1]
Print
Author Topic: Polygon Dropout  (Read 741 times)
bateleur
Level 10
*****



View Profile
« on: April 02, 2019, 01:47:45 AM »

Although I've been using Unity for over a decade now, this is very much a n00b question:

How do I prevent GameObjects from disappearing when close to the camera? In particular, when the centre of the object is no longer in the view volume (but other parts of it are)?

This isn't just to do with polygons, since when (say) a cube suffers from this problem it's clear the whole thing disappears at once, not just one triangle at a time.

(I am aware of the "clipping planes" setting on the Camera, but it doesn't help since the near plane cannot be set below zero. I am not using occlusion culling.)

Any tips?
Logged

bateleur
Level 10
*****



View Profile
« Reply #1 on: April 03, 2019, 08:25:31 AM »

Update: Now solved.

The problem was that Unity relies on the cached value of mesh.bounds to do frustrum culling, so any change to a mesh must be followed by an explicit call to mesh.RecalculateBounds(), even if you're not using a MeshCollider.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic