Hi,
I am trying to increase the bounds of a rigidbody collider, but nothing seems to work. I’ve tried the following in Start() :
for (int i=0;i<10;i++)
{
GameObject go = m_gameObjects[i];
MeshRenderer mr = go.GetComponent<MeshRenderer>();
Mesh mesh = mr.GetComponent<MeshFilter>().mesh;
mesh.bounds.Expand (new Vector3(1f, 1f, 1f));
go.rigidbody.collider.bounds.SetMinMax(new Vector3(-1f,-1f,-1f), new Vector3(1f,1f,1f));
go.rigidbody.collider.bounds.Expand(new Vector3(1f, 1f, 1f));
}
- but when I run the game the rigid bodies still collide as if they are still tightly wrapped to the visible mesh.
This looks like it should be a no-brainer, so what am I doing wrong?
Thanks.