- Home /
rescaling box collider to the same dimension as the skinned mesh renderer
after solving the animation problem I came across another one. The animation of model is quite smooth however I noticed that the mesh collider does not update with motion of the model. It's the same as the first idle frame all throughout different animations.
My first solution: Use a box collider instead
I replaced the mesh collider with a box one. It didn't solved the problem.
As I was exploring the inspector tab, I notice a component called SkinnedMeshRenderer. When I run the game, the white box (I think this is the bounds of the SkinnedMeshRenderer) updates with every frame (it gets smaller for smaller frame and bigger for bigger frame). Basically, this is what I'm trying to achieve. But there's no collision happening here.
My second solution: Resize the box collider to have the same dimension as the skinnedmeshrenderer
I tried accessing the SkinnedMeshRenderer bounds.size field but it's not getting the proper result. Anyway to do this? Thanks in advance :)