BoxCollider 3D not rotating with game object

Using:

transform.Rotate(new Vector3(0, 0, spinSpeed));

to rotate my game object,

However, the boxcollider also attached does not seem to update, my bounds seem to retain it’s original orientation.

When I use

if (collisionBox.bounds.Contains(boid.getPos()))

the collision box bounds seem to never get updated from their original rotation, even though in the scene view the box collider around my mesh seems to get updated. I’ve also tried attaching the boxcollider to an empty gameobject as a child of the original mesh game object, but this also does not work.

I want the box collider bounds to update as the transform is rotated.

Any ideas?

Well, it does rotate. The problem is, collisionBox.bounds represents an axis aligned bounding box. It is aligned with coordinate axes and is not rotated. It is explained here: Unity - Scripting API: Bounds