I am designing a 2D sidescrolling point and click game.
I have a scene that takes place in a circular room.
I am trying to create the following effect:
When the player moves to either side, the room (walls and furniture in from of it) will scroll to signify he is moving along the wall of the room.
If the player keeps walking he will eventually end up in the same place as he started - because the room is supposed to be circular.
How can I create this effect?
I know how to make an endless repeating background, of course, but for this effect I need to move (or whatever) the whole thing - background, meshes, objects etc. and have them in their updated states (a drawer opened earlier should still be opened when the player has gone around the room and comes upon the drawer again).
Does anybody have an idea of how to accomplish this?
Seems to me you’d want your entire room to be contained within one parent that you then rotate. So make a master gameobject that will be the parent of the room, then put everything that is visible or otherwise needs to be part of the room itself as a child of that gameobject. Then when the player ‘moves’ instead of giving them any velocity or horizontal position change, you instead rotate the room using a rotation on the parent the appropriate amount.
Only issue with this approach, but I think it is pretty unavoidable, is the art will distort a bit as it rotates, so want to keep your art fairly simple so the distortion in minimized.