This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

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 lookat() doesn't do exactly what I want to do. to work around this, I simply need to make my camera lookat() 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.

in Engine by (14 points)
edited by

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.