- Home /
Animated mesh is clipping in viewport and in game camera
Hey guys,
Very weird thing is going on and I don't know where to even start looking. I have two metal rods which are animated to be destroyed (they break into pieces and fly in a given direction). They have identical settings (picture below).
The thing is, one of those animations is clipping for some reason. What I mean is, that when the pieces of one of those metal rods get animated and fly at you, they disappear half way through the animation. If you zoom out and look at it from afar everything's visible fine but up close (and that's how they're viewed when in game) the meshes disappear half way through.
I tried capturing what i'm saying below. If it's still not clear I'll try to shoot a video.
If anyone has any idea what the hell's going on it'll be hugely appreciated if you share your thoughts.
P.S. Yes, I did play around with camera's clipping planes, bringing it all the way down to 0.01 and it still didn't work. Besides it does the same in scene view :\
Answer by Paulius-Liekis · Jul 01, 2014 at 10:23 AM
Maybe it's culling of SkinnedMesh. Try set UpdateWhenOffsecreen to true. And "Culling Type" on Animation component to Always Animate.
Culling type was already on "Always Animate" and when I turned on "UpdateWhenOffScreen" it did solve the problem so hats off to you sir, thanks a lot for the solution!
But the thing is, the other animation does not have the "UpdateWhenOffScreen" option on and it still works as it should, so I'm guessing we only went around the problem, not solved it?
The animation now works as it should so I'm happy but it's still interesting what can be causing this behaviour...
Thanks again Paulius Liekis, you're da man!
Your mesh are probably imported in slightly different way (differences in bounds of Animation / Skinned$$anonymous$$eshRenderer) and then it fails to calculate bounds (for culling) in runtime and culls earlier than it's supposed to.
Something like this. I don't remember inner workings of Skinned$$anonymous$$esh renderers exactly since it has been changed multiple times recently.
$$anonymous$$ark the answer as correct if it solves your problem. And note that you can post comments or answers (if you're actually answering a question). Welcome to Unity Answers.
ah sorry, I tried upvoting it and it told me I didn't have enough posts and I didn't see the "correct" button : )
Your answer
Follow this Question
Related Questions
Unity Multiplayer - Animations - mesh subobject movements conveyed 1 Answer
How can I emit animated prefabs from a particle system? 0 Answers
A mesh behind other meshes appears above depending on viewing distance. 1 Answer
Character Controller mesh scaling with animations 0 Answers
Fill in mesh? 2 Answers