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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Add comment