Rotatearound Collider axis

I'm looking for in the long run is essentially a sort of "hinge" effect using rotate around. When the player looks at a wall & presses a button the world around the player rotates 90 degrees using:

the player as the point

&

*the specific walls forward/backward or up/down axis (depending on whatever wall the player is directly looking at)

I want to use a ray that is being cast from the player to determine which walls axes will be used by my rotation script since I have a fairly large number of walls, but I don't know how to do this.

alt text

The easiest thing I can think of is to make the collider object (dummy), that is hit by the ray cast, a parent of your first person. Then rotate the dummy. Your first person will rotate properly (follow) because it's a child of your dummy. When rotation ended you can unparent again if needed. Repeat this as needed on other dummies. Hint: You might want to reset the dummie's rotation to avoid rotation mess if dummy is hit another time by ray cast starting the procedure another time.