Rotated Cubes Having Issue with Collision Detection.

For a project I’m working on I’ve created a prototype room set up with four walls and a floor.
One wall is rotated at -90 on the Y axis, another 90 on the Y axis and the floor rotated at 90 in the Y and Z axis.

I’ve applied box colliders onto each wall and the floor and collision detection is working between the two walls that are not rotated however the walls that are rotated are not hitting the detection. I’ve tested them both as being in the 0,0,0 rotation and the collision detection works fine then, it’s only when rotation is applied that the collision detection isn’t working.

Any advice on this matter would be greatly appreciated!

How are you rotating them? If you are using rigidbody.Addtorque it should work. If you are setting rotation or position, it will ignore all physics rules and set the position/rotation of the objects.

Also, are the walls thick? If you are using cubes as walls it will be better. Planes are thin and if the colliding object is moving faster than the physics update is, it will end up through the object.

Got the issues sorted out. Looked like the rotation was throwing off the colliders. Made new cubes for the walls with the colliders attached and it works fine now. Thanks for taking the time to reply though! appreciate it.