Skip to content
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

Open
elvisish opened this issue Mar 7, 2024 · 2 comments
Open

Built-in jumping/falling lookahead for 2D? #228

elvisish opened this issue Mar 7, 2024 · 2 comments

Comments

@elvisish
Copy link

elvisish commented Mar 7, 2024

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

@ramokz
Copy link
Owner

ramokz commented Mar 7, 2024

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.
TLDR; the velocity of the follow target would offset the camera in the direction the target is moving.

@elvisish
Copy link
Author

the velocity of the follow target would offset the camera in the direction the target is moving.

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants