Need help figuring out methods to recenter the phantom camera #516
-
Hi there! I'm doing a 2.5d platformer game and some objects in the world allow for some flight inspired movement. This process involves changing follow targets, the follow damping values, etc. My camera setup is a framed follow with no look at target to give that side scroller style. Sometimes because of the change of follow offset, the character becomes off-centered while following the dead zones. I'm looking for techniques that can allow recentering to occur. Whether it be to reset the follow target (even tho its already assigned properly maybe it would be like restarting a machine that it would work properly again) or to reset the follow offset and follow damping values, or to manually change the coordinates of the camera Any suggestions would be greatly appreciated!! (Using 4.3 godot btw) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Update here, I sorta found a solution in recentering in that I would just manually set the follow mode to simple when the player is idle and any other state i would set it to framed and that seems to work surprisingly well Still open to hearing other suggestions! |
Beta Was this translation helpful? Give feedback.
-
The answer depends a bit on what you're looking to achieve. If you want the camera to instantly be in its desired position, post-damping, then the simplest answer would be to call the But if you want it to be more of a smooth transition, then you could juggle between 2 But given you mention you're changing the
Would discourage changing the |
Beta Was this translation helpful? Give feedback.
The answer depends a bit on what you're looking to achieve.
If you want the camera to instantly be in its desired position, post-damping, then the simplest answer would be to call the
teleport position
method. It essentially resets the camera to its intended position, which bypasses any acceleration and damping values and logic. The current version of the addon in the git branch has better support for that functionality — will make another minor release in the very near future.But if you want it to be more of a smooth transition, then you could juggle between 2
PCams
as you want things to change, which is what I generally suggest. Then you can reset the properties to the inactive one and…