-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Built-in jumping/falling lookahead for 2D? #228
Comments
It's not a built-in feature at the minute, but there are plans for implementing it. There is an existing PR for that, with an explanation for how it ought to work. |
Yep, it should also maintain the same distance depending on velocity (so super fast falling, jumping or running doesn't allow the tweening camera position to lag behind). |
Is look-ahead still planned? The original PR seems to be closed/deleted: #160 (comment) |
Short answer, support is still planned. That PR you linked to was closed as it was based on a hardcoded lookahead value, whereas the behavior should ideally be dynamic based on the target's velocity instead; with some parameters around that. Another PR (#284) also aimed at implementing it, but that PR has, at this point, likely been abandoned by the author. Am personally caught up with more fundamental changes / improvements to the addon, so it's not at the top of my todo list atm. |
Great, I think it's also important to note that look ahead should be factored into framed mode. Currently if you're using framed, the player is offset from the center of the screen by the framed dead zone amount, which makes it difficult to see enemies for the sake of having the camera move a bit later. The same goes for slow lerp speeds. Look ahead should always be the last thing calculated so it can be used to effectively recenter the player (or even offset them negatively from the center for even better visibility ahead). |
Project Type
2D
Feature Description
Is it possible to have a built-in lookahead distance for jumping and falling that adjusts depending on the falling and jumping speed? I believe it can be done currently by manually adjusting the Follow Target Offsets depending on the Y velocity, but it would be very useful to have it out-of-the-box for a lot of 2D games.
Use Cases
If the character is falling pretty fast or jumping/springing quickly, this would ensure the player doesn't leave the screen.
Importance
Low - there are workarounds where the proposed feature would just simplify things
Usage
Often - a significant amount of projects can find this useful
(Optional) Proposed Solution
No response
The text was updated successfully, but these errors were encountered: