- Home /
Trigger BoxCollider Fails to Move With GameObject After Resize
I have a GameObject with an attached rigidbody. I also have a second GameObject the transform of which is parented to the first. This second GameObject has a BoxCollider with isTrigger set to true.
All works as it should until I do this:
var bcol:BoxCollider = thing.GetComponent(BoxCollider);
var csz:Vector3 = Vector3(width,width,width);
bcol.size = csz;
bcol.center = Vector3.zero;
Then something very weird happens. The trigger continues to exist and to trigger successfully, but it no longer moves when the GameObject of which it is a component moves.
Is this a bug, or am I doing something illegal?
Comment