Search Issue Tracker
By Design
Votes
3
Found in
4.3.1f1
Issue ID
578605
Regression
No
Unable to update to meshcollider with skinnedmeshrenderer and BlendShapes.
To reproduce:
1. Open testPlugin project
2. Open testBlendShapes scene
3. Press play
4. Move around sliders
Expected result: Mesh collider updates correctly
Actual result: Mesh collider stays the same
Resolved by design: The SkinnedMeshRenderer is, as it's name applies, a Renderer. It applies some deformations to the mesh data as it is rendering. However, it does not modify the original mesh asset. For that reason, other components using that Mesh (such as a MeshCollider) will not see any changes on the mesh from the skinning.
It is possible to achieve what you want using the BakeMesh method on the SkinnedMeshRenderer, which stores the skinning results into a Mesh asset:
http://docs.unity3d.com/ScriptReference/SkinnedMeshRenderer.BakeMesh.html
However, I would suggest looking for another way to solve the problem you are trying to solve, as, even if this works, updating MeshCollider meshes in real time is pretty slow, as the physics engine needs to rebake collision data it handles for each MeshCollider each time the mesh changes, which is a slow process.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [HDRP] Game view renders artifacts when Camera's Component "Post Anti-aliasing" is set to "TAA" and Dynamic Resolution's "Forced Screen Percentage" is changed
- A deactivated Prefab's name color becomes white when a GameObject in the scene is deactivated
- The Game view becomes blank when using Frame Debugger with MSAA and Texture binding enabled in Play Mode
- NullReferenceException is thrown when changing the Inspector preview selection
- The build size is larger when Models have Animation Type set to Generic
Add comment