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
- Standalone Player crashes with "TDerived GetOrLoad<TDerived>() where TDerived : T" when IL2CPP Code generation is set to "Faster (smaller) Builds"
- IndexOutOfRangeException and InvalidOperationException when logging XML string
- Script missing in "Assets/Settings/Mobile_Renderer/GlobalVolumeFeature" of "com.unity.template.urp-blank" template
- “Font Asset Creator - Error Code [Invalid_File_Structure]…“ error is logged when generating Font Assets from fonts with meta files from previous Editor versions
- Input.mousePosition returns (NaN, NaN, 0.00) when Scene view is opened
Add comment