How to rotate a point 90 degrees around another in a 2D camera

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ayoimakat

I’m currently trying to make my camera look at a specific entity when a player presses a key, sort of like a lock on system. My game is a top down game, so I want to keep my player at the bottom of the screen while the entity which is being lock onto remains above the player. However, because of how Camera2D is coded, the front of the camera is actually on the right-side of the screen. thus look_at() doesn’t do exactly what I want to do. to work around this, I simply need to make my camera look_at() a new var, lets call this cam look, which is the entity’s position, rotated 90 degrees around the center of the camera. However, I cant seem to find anything online that shows me how to do a fixed rotation around a vector and not a point (meaning the var being looked at everyframe is the 90 degree rotation around a vector2D of the updated position of the entity).

Any help would be much appreciated.