Godot Version
Godot 4.3 mono
Question
I’m creating a 2D game, and the main character has the ability to alter gravity or stick to surfaces with their feet, allowing them to walk on walls, somewhat like Spider-Man.
I want to achieve the following effect: when the main character walks onto a wall, the entire screen rotates accordingly, making the wall the new horizontal line. For example, in the image below, the main character is standing in a U-shaped valley. On the left is the screen before rotation, with the main character walking in the direction indicated by the red arrow. On the right is the screen after the camera has rotated, with the main character now on the wall.
Due to certain characteristics of the game, I cannot directly rotate the entire world, so I prefer to rotate theCamera2D
. However, it seems that the rotation
property of Camera2D
is just for decoration—no matter how I set it, there’s no visible effect.
Does anyone know how to achieve this screen-rotation effect without rotating the world?