- Home /
dynamic mesh keeps disappearing
Hey,
i generate meshes dynamically from an octree. but something seems to be wrong with the visibility determination of unity. when i turn the camera the dynamic mesh disappears at some angles and reappears when i turn the camera back. this also happens in the game camera not only in the editor camera.
i use RecalculateBounds after the mesh generation...
mesh visible:
mesh disappears after turning the camera slightly:
Answer by roamcel · Aug 05, 2011 at 08:47 AM
For a start you might want to assure that this is not just a CLIPPING PLANE issue. If your scene is huge, the camera might be clipping objects that are just a bit too far ( i believe distance determination is done in their center) Access the camera and try increasing its clipping plane 'FAR' attribute, to verify.
The only mesh related thing I can think about is SCALE. This phenomenon would be similar to one you experience when you export characters from 3d programs, and their scale is not uniform (for example negative on an axis and positive on others). If you scale your primitives before composition, you might want to try multiplying their original size by a factor, so that the objects become bigger. On the other hand, if the objects are very big, you might need to decrease their scale, for the same issue.
Keep in mind that unity's measure units are basically METERS. a 1,1,1 cube is a 1m sided cube.
Answer by adamscamden2 · Mar 30, 2020 at 08:55 PM
hey, @pragmascript did you ever solve this issue its 2020 and Im still getting that issue
Hey sorry I don't remember. I have been doing a few projects with dynamic mesh generation since and I don't think i ran into this particular problem again.
Your answer
Follow this Question
Related Questions
culling issues on dynamically generated mesh 1 Answer
[PS4] Mesh becomes invisible in-game after it rotates for a while 0 Answers
How to determine if a mesh is on screen. 1 Answer
How can I create a destructible soft body mesh? 2 Answers
What does mesh.MarkDynamic actually do? Documentation explains nothing. 1 Answer